Hello,
1. The following code (below) and output <varIdentOutput.txt>
illustrate that
argument fixed= in varIdent function is ignored during the execution.
2. File named <RevisedvarIdent.txt> shows how to fix the problem.
The changed line in this file is labeled using comment " # !!! This
line changed".
Thank you
Andrzej Galecki
### Code used for illustration starts here ####
library(nlme)
sessionInfo()
Orth <- subset(Orthodont, Subject %in% c("M01","F01"))
# Argument fixed in varIdent is ignored
vf1.incorrect <- varIdent(form=~1|Sex,fixed=c(Female=0.5))
vf1I <- Initialize(vf1.incorrect, data=Orth)
varWeights(vf1I)
# Tentative varIdent function (revised)
source("C:/temp/RevisedvarIdent.txt")
vf2.correct <- varIdent(form=~1|Sex,fixed=c(Female=0.5))
vf2I <- Initialize(vf2.correct, data=Orth)
coef(vf2I)
varWeights(vf2I)
# rm(varIdent) # Remove tentative varIdent function
### Code ends here ####