[R] Error in augPred ?

Bo Martin Bibby bibby at dina.kvl.dk
Thu Aug 14 16:20:24 CEST 2003


  Hi,

The following example produced an error message from augPred:

library(nlme)
test <- data.frame(A=rep(c(1,2),each=8),B=rep(1:4,each=4),x=rep(1:4,4),
                   y=c(0.2, 1.6, 1.9, 3.0, 0.1, 0.9, 1.5, 2.6, 1.4,
                       2.3, 2.9, 3.4, 0.8, 1.5, 2.1, 2.4))

test$A <- factor(test$A,levels=1:2)
test$B <- factor(test$B,levels=1:4)

testgd <- groupedData(y~x|B,data=test)

testgd.nlme <- nlme(y ~ asym/(1+exp((xmid-log(x))/scal)),
                    data = testgd,
                    fixed = asym + xmid + scal ~ A,
                    random = xmid ~ 1,
                    start = list(fixed = c(5,0,1,0,0.7,0)))
augPred(testgd.nlme)

Error in predict.nlme(object, value[1:(nrow(value)/nL), , drop = FALSE],:
        Levels 1,2 not allowed for A

The problem was described in a mail in August 2001 but I have seen no
solution. There is no problem in S+.

Any suggestions?

Bo

         _
platform i386-pc-linux-gnu
arch     i386
os       linux-gnu
system   i386, linux-gnu
status
major    1
minor    7.1
year     2003
month    06
day      16
language R

Package: nlme
Version: 3.1-44
Date: 2003/08/09
Priority: recommended
Title: Linear and nonlinear mixed effects models
Author: Jose Pinheiro <Jose.Pinheiro at pharma.novartis.com>, Douglas
        Bates <bates at stat.wisc.edu>, Saikat DebRoy
        <saikat at stat.wisc.edu>, and Deepayan Sarkar
        <deepayan at stat.wisc.edu>
Maintainer: Douglas Bates <bates at stat.wisc.edu>
Description: Fit and compare Gaussian linear and nonlinear
        mixed-effects models.
Depends: nls, lattice, R(>= 1.7.0)
License: GPL version 2 or later
Built: R 1.7.1; i386-pc-linux-gnu; 2003-08-13 14:33:43




More information about the R-help mailing list