This may be a bug -- report it at https://bugs.r-project.org/bugzilla/ (but check to make sure a related bug hasn't already been filed). Phillip
On 29/01/2020 21:17, Bill Denney wrote:
Hello, When trying to fit an NLME model using a vector of varFixed, I get an error that appears to be related to a multiplication issue at this line of code: https://github.com/cran/nlme/blob/c006dfa23ad390948a74e67978a9828a6d60d89b/R/varFunc.R#L169 Is the below a bug or am I inaccurately applying varFixed (or something else)? Here is a reproducible example: library(nlme) d <- data.frame( obs=rnorm(n=97), # 97 chosen because it's prime and therefore can't be the size of a rectangular matrix groups=rep(c("A", "B"), each=50)[1:97], wt=abs(rnorm(n=97)) ) nlme( obs~b, fixed=b~1, random=b~1|groups, weights=varFixed(~wt), start=c(b=0), data=d ) Which gets the error: Error in recalc.varFunc(object[[i]], conLin) : dims [product 12] do not match the length of object [97] In addition: Warning message: In conLin$Xy * varWeights(object) : longer object length is not a multiple of shorter object length Thanks, Bill [[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models