Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Crossed random effects model-error r(3203)

    I have been running crossed random effects mixed models and the syntax that has always worked before (but which I had not used since January) has stopped working for me. The data set involves survey data with countries and years cross-nested. The basic model specification I have used is (here without any predictors for simplicity):

    mixed dem_sat || _all: R.year || country:

    But where this command was working for me in January, now I get the following output:

    MapRowsToIntegers(): 3203 <tmp>[1,306293] found where colvector required
    GenGroupSampleNumeric(): - function returned error
    <istmt>: - function returned error
    r(3203);

    That happens no matter what dependent variable I use. I am running stata 16.1.

  • #2
    Matthew:
    is your copy of Stata fully updated?
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      yes it is

      Comment


      • #4
        Matthew:
        unfortunately, I cannot replicate your problem with the following toy-example:
        Code:
        . use https://www.stata-press.com/data/r16/productivity
        (Public Capital Productivity)
        
        . mixed gsp  || region: || state:
        
        Performing EM optimization:
        
        Performing gradient-based optimization:
        
        Iteration 0:   log likelihood =  200.86162 
        Iteration 1:   log likelihood =  200.86162 
        
        Computing standard errors:
        
        Mixed-effects ML regression                     Number of obs     =        816
        
        -------------------------------------------------------------
                        |     No. of       Observations per Group
         Group Variable |     Groups    Minimum    Average    Maximum
        ----------------+--------------------------------------------
                 region |          9         51       90.7        136
                  state |         48         17       17.0         17
        -------------------------------------------------------------
        
                                                        Wald chi2(0)      =          .
        Log likelihood =  200.86162                     Prob > chi2       =          .
        
        ------------------------------------------------------------------------------
                 gsp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               _cons |   10.65961   .2503806    42.57   0.000     10.16887    11.15035
        ------------------------------------------------------------------------------
        
        ------------------------------------------------------------------------------
          Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
        -----------------------------+------------------------------------------------
        region: Identity             |
                          var(_cons) |   .4376123   .2697616      .1307299    1.464887
        -----------------------------+------------------------------------------------
        state: Identity              |
                          var(_cons) |   .6080626   .1382733      .3893904    .9495358
        -----------------------------+------------------------------------------------
                       var(Residual) |   .0246633   .0012586      .0223159    .0272577
        ------------------------------------------------------------------------------
        LR test vs. linear model: chi2(2) = 2750.56               Prob > chi2 = 0.0000
        
        Note: LR test is conservative and provided only for reference.
        
        .
        Therefore, I would:

        -re-run your model with two-level and then three-level design and see when Stata gasps;
        -contact Stata Tech support if what above does not give you any clue about what went wrong along the way.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Hi
          On my phd I have an argument states that gender is a predicted variable for the relationship between innovation and religion. Men is more likely to have higher effect than women. The data showed me a significant difference between genders, however, the difference is very small regarding the coefficient only 0.05. My supervisor is not happy with this result. My questions are , 1-what is the acceptable coefficient difference between tow groups 2- are there any methods that can boost the difference between genders? I am using STATA 2015
          thanks

          Comment


          • #6
            Duplicate post.
            See https://www.statalist.org/forums/for...tow-groups-ols
            Last edited by Carlo Lazzaro; 04 Jun 2020, 11:09.
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment


            • #7
              Hi Matthew, did you solve the problem? I have the same issue after running mixed models (the last time was months ago).
              Best,
              Stefano

              Comment


              • #8
                I have the same problem when trying to run a cross-classified multilevel model.

                Comment


                • #9
                  I have the same problem when trying to run a cross-classified multilevel model. Carlo Lazzaro, I believe that the reason you don't get the error is perhaps because you dont specify "all_: r.region"

                  I have longitudinal data with students nested in schools. However students change schools during the time spand, so the data is cross-classified.
                  I get the error when running a model like this one:

                  Code:
                   mixed score i.gender##i.time || _all: r.school || student_id:, covar(unstruct)

                  Comment


                  • #10
                    Mads:
                    thanks for pointing this out.
                    However, even specifying the -_all:- option, I cannot replicate the error:
                    Code:
                    . use https://www.stata-press.com/data/r16/productivity
                    (Public Capital Productivity)
                    
                    .  mixed gsp  || _all: R.region|| state:
                    
                    Performing EM optimization: 
                    
                    Performing gradient-based optimization: 
                    
                    Iteration 0:   log likelihood =  200.86162  
                    Iteration 1:   log likelihood =  200.86162  
                    
                    Computing standard errors:
                    
                    Mixed-effects ML regression                     Number of obs     =        816
                    
                    -------------------------------------------------------------
                                    |     No. of       Observations per Group
                     Group Variable |     Groups    Minimum    Average    Maximum
                    ----------------+--------------------------------------------
                               _all |          1        816      816.0        816
                              state |         48         17       17.0         17
                    -------------------------------------------------------------
                    
                                                                    Wald chi2(0)      =          .
                    Log likelihood =  200.86162                     Prob > chi2       =          .
                    
                    ------------------------------------------------------------------------------
                             gsp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                           _cons |   10.65961   .2503806    42.57   0.000     10.16887    11.15035
                    ------------------------------------------------------------------------------
                    
                    ------------------------------------------------------------------------------
                      Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
                    -----------------------------+------------------------------------------------
                    _all: Identity               |
                                   var(R.region) |   .4376123   .2697616        .13073    1.464886
                    -----------------------------+------------------------------------------------
                    state: Identity              |
                                      var(_cons) |   .6080626    .138273      .3893908    .9495349
                    -----------------------------+------------------------------------------------
                                   var(Residual) |   .0246633   .0012586      .0223159    .0272577
                    ------------------------------------------------------------------------------
                    LR test vs. linear model: chi2(2) = 2750.56               Prob > chi2 = 0.0000
                    
                    Note: LR test is conservative and provided only for reference.
                    
                    .
                    Kind regards,
                    Carlo
                    (StataNow 18.5)

                    Comment

                    Working...
                    X