2
$\begingroup$

I am running into two issues.

  1. As such, I am not confident in my interpretation of summary estimates from the Random Effects part of lme function.
  2. I used the tab_model function from SjPlot and the estimates from the lme model appears incorrectly after exporting the results using tab_model function. This further complicates the situation.

Briefly, this is my dataset.

Outcome is continuous (school test scores)

13 Schools in my study. Random students selected for testing. All students who were selected were tested. Students nested within Schools.

I am interested in estimating the random intercept for each School and each Student.

So this is my model.

lme( y ~ SchoolName + Age + Sex, random = ~1 | SchoolName/StudentID, data= df)

The results are like this.

Fixed Effects:

              Estimates     C.I           P
Intercept     44.12         39; 52.12     <0.05
.
.
.
.

Random Effects:

Formula: ~ 1 | SchoolName 
             Intercept 
    StdDEV : 1.0849   

Formula: ~ 1 | StudentID %in% SchoolName 
             Intercept     Residual
    StdDEV : 8.0771        6.92993

When I export this to a csv file using tab_model from SjPlot

enter image description here

So I like to get some advise.

  1. Is my model setup correct , for a nested dataset like this where the goal is to estimate random intercept for both School and Students, Students nested within School.

  2. My interpretation of random effects is that the a) one can expect a variation of 1.0849 points in test scores from different schools. b) There is a variation of around 8.07 points in test scores among students.

  3. I am not sure what residual StDev is and I dont know why tab_model function has switched these random effects estimates.

Highly appreciate any advice. Thanks in advance.

$\endgroup$
3
  • $\begingroup$ Since School (represented by its SchoolName) is a random factor, it doesn't make sense to include it as a fixed effect also: lme( y ~ Age + Sex, random = ~1 | SchoolName/StudentID). Do you have data on classes also? In such education setting the nested random effect is often School/Class/StudentId. $\endgroup$
    – dipetkov
    Commented Apr 4 at 20:42
  • $\begingroup$ @dipetkov, no class, only School/Students for now. $\endgroup$
    – Science11
    Commented Apr 5 at 4:46
  • $\begingroup$ Since there are 13 schools and 6,239 students (and not class information) then I suggest you can fit the School as a fixed effect. This will simplify the task to interpret the model. $\endgroup$
    – dipetkov
    Commented Apr 5 at 7:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.