agalecki at umich.edu
2007-Aug-07  19:44 UTC
[Rd] Bug in coef<-.varIdent method (nlme package) (PR#9831)
Hello,
1. It appears that "coef<-.varIdent" method does not work properly
in
some instances.
Execution error:
Error in `coef<-.varIdent`(`*tmp*`, value = c(11, 12)) :
        Cannot change the length of the varIdent parameter after 
initialization
occurs when  "coef<-.varIdent" is applied to an initialized object
of
class varIdent  with some of the coefficients  being _fixed_.
Attached files: 'varIdentOrthoEmail.txt'  and
'varIdentOrthoEmail.Rout'
illustrate the problem.
2. The code for  "coef<-.varIdentX" method in  
'varIdentmethodsRevised.txt' file  illustrates how to fix this problem.
3. Specifically, to fix the problem the line
       if (length(value) != nGroups  - 1)  
   in  the "coef<-.varIdent" method should be replaced
   with the following two lines :
        nFixed  <- sum(as.numeric(attr(object,"whichFix")))  #
inserted
new line
        if (length(value) != nGroups - nFixed - 1) {               # 
modified original line
4. Note: Although I am using lme "3.1-80", the  related problem
PR#9765
is fixed manually by over-writing varIdent function.
Thank you
Andrzej Galecki
Maybe Matching Threads
- Bug in getVarCov.gls method (PR#9752)
- Online course- Mixed Effects Models
- Process R segmentation with strsplit() (PR#6601)
- Fitting heteroscedastic linear models/ problems with varIdent of nlme
- Getting intervals for within-group standard errors for each group using nlme and varIdent
