[R-sig-ME] Error with nlme and varFixed
biii m@iii@g oii de@@ey@ws
biii m@iii@g oii de@@ey@ws
Tue Feb 11 20:53:45 CET 2020
Hi Phillip,
Thanks for the confirmation. I searched and didn't see one line it. I've submitted it here: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17712
Thanks,
Bill
-----Original Message-----
From: Phillip Alday <phillip.alday using mpi.nl>
Sent: Tuesday, February 11, 2020 2:43 PM
To: Bill Denney <wdenney using humanpredictions.com>; r-sig-mixed-models using r-project.org
Subject: Re: [R-sig-ME] Error with nlme and varFixed
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
More information about the R-sig-mixed-models
mailing list