2
$\begingroup$

Suppose we have a mixed model for repeated measures with response being $y$ and a covariate being $x$(say, age). There are two classification factors $a$ and $b$. Say, 5 psychological patients($a$) in 8 conditions($b$) are measured.

I want to know how I get the estimates of intercepts and slopes (and their standard errors) of the random effects model when:

  1. $a$ fixed, $b$ random
  2. $b$ fixed, $a$ random
  3. Both random

How should the appropriate code look like?

Besides, can you tell me something about the meaning of the following error message?

  nlminb problem, convergence error code = 1
  message = iteration limit reached without convergence (10)
$\endgroup$
5
  • $\begingroup$ Do you have individual measures for all 8 conditions (crossed factors $a$ and $b$)? $\endgroup$
    – chl
    Commented Nov 19, 2012 at 20:46
  • $\begingroup$ Yes I have individual measures for all 8 conditions. $\endgroup$
    – Blain Waan
    Commented Nov 20, 2012 at 1:43
  • $\begingroup$ @chl is there any suggestion for me regarding this problem? I have failed to fix it. $\endgroup$
    – Blain Waan
    Commented Nov 24, 2012 at 18:17
  • 1
    $\begingroup$ Usually, for the random effects parts, random=~1|id corresponds to a random intercept for each statistical unit id while random=~grp|id would yield random intercept and slopes (for id within each level of grp). For crossed random effects, things are a little bit more complicated and you'll need to use one of the pdBlocked together with pdIdent (block diagonal VC matrix with diagonal blocks given by multiples of the identity matrix) or pdSymm (id. with PD matrices). I would be happy to try to give more details with a small working example. $\endgroup$
    – chl
    Commented Nov 25, 2012 at 11:43
  • $\begingroup$ Thank you! I'll look into the points from your kind suggestion. $\endgroup$
    – Blain Waan
    Commented Nov 26, 2012 at 7:56

0

Your Answer

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