From: David Reitter <david.reitter_at_gmail.com>

Date: Wed 01 Feb 2006 - 07:39:15 EST

}

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Feb 01 07:48:30 2006

Date: Wed 01 Feb 2006 - 07:39:15 EST

On 30 Jan 2006, at 22:01, David Reitter wrote:

> I'm trying to use "predict" with a linear mixed-effects logistic

*> regression model fitted with nlmmPQL from the MASS library.
**> Unfortunately, I'm getting an error "non-conformable arguments" in
**> predict.lme, and I would like to understand why.
*

I'd like to add a bit of information. (Correction: I am talking about glmmPQL from the MASS library.)

Again, the error I'm getting is:

> > yp = predict(model, newdata=new, type="response", level=0)

*> Error in X %*% fixef(object) : non-conformable arguments
*

I have ensured that I input a data frame in newdata with the fixed factors/predictors filled in (as factors with the correct level sets where appropriate).

Debugging this, I had a look at lme.R from the nlme library. Specifically, line 1909:

if (maxQ == 0) {

## only population predictions val <- c(X %*% fixef(object)) attr(val, "label") <- "Predicted values" return(val)

}

the 'fixef' structure in my model looks like this (7 elements)

fixef(model)

(Intercept) log(distance) -2.14560407 -0.13207341 roler sourcemaptask -0.58692474 -0.93108113 log(distance):roler log(distance):rolei:sourcemaptask 0.16449238 0.06877369 log(distance):roler:sourcemaptask -0.12278367

But the predict.lme function produces the following 6x5 matrix

(Intercept) log(distance) roler sourcemaptask log (distance):roler log(distance):roler:sourcemaptask

1 0.0000000 1 0 0.0000000 0 1 0.6931472 1 0 0.6931472 0(...)

We're missing the coefficient for the 3-way interaction "log (distance):rolei:sourcemaptask", which is why we can't come up with the inner product of X and the fixed effects coefficients.

Is this an issue with predict.lme, and/or can I do something about it?

Thanks

D

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Feb 01 07:48:30 2006

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:42:15 EST
*