4
$\begingroup$

I wish to run lme with a pre-specified starting value for the residual variance. I know that this may not be the best thing to do, but I have to start from that value. However, when trying via the weights option, lme completely ignores it as it gives the estimated residual st.dev.

Do you have any idea how to deal with this problem?

## now try with 10
fm1 <- lme(distance ~ 1, data = Orthodont, 
           weights = varIdent(value=10,form = ~1), # start sigma=sqrt(10)
           method= "ML",
           random = ~ 1|Subject,
           control= list(maxIter= 0, # do not perform any iterations 
                         msMaxIter= 0, # do not perform any iterations
                         msVerbose=T,
                         niterEM= 0,  # do not perform any iterations
                         returnObject = T))
VarCorr(fm1)
## Subject = pdLogChol(1) 
##             Variance StdDev  
## (Intercept) 7.625059 2.761351
## Residual    4.289096 2.071013


## now try with 1000
fm2 <- lme(distance ~ 1, data = Orthodont, 
           weights = varIdent(value=1000,form = ~1), # start sigma=sqrt(10)
           method= "ML",
           random = ~ 1|Subject,
           control= list(maxIter= 0, # do not perform any iterations 
                         msMaxIter= 0, # do not perform any iterations
                         msVerbose=T,
                         niterEM= 0,  # do not perform any iterations
                         returnObject = T))
VarCorr(fm2)
## Subject = pdLogChol(1) 
##            Variance StdDev  
## (Intercept) 7.625059 2.761351
## Residual    4.289096 2.071013
$\endgroup$

1 Answer 1

5
$\begingroup$

After a deep diving into the lme code and after carefully reading Pinheiro and Bates (2000) Mixed-effects Modles in S and S-PLUS, I realised that it is not possible (and it is nonsensical) to provide a starting value for sigma. This is so because $\sigma^2$ is profiled out from the rest of the parameters and its estimation given the rest of the parameters, is performed in analytically by the average (or corrected average depending on which method is used) of the squared residuals. Hope this may be useful.

$\endgroup$
1
  • 2
    $\begingroup$ (+1) It might be worth editing your question title to something along the lines of "Does it make sense to force lme to....". This is because in its present form, it is probably off-topic for CV, being purely about implementation. Your answer makes clear that the underlying reason is on-topic. $\endgroup$
    – mkt
    Nov 30, 2018 at 11:00

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.