[R] Problem with offset (Glm or glmD) in Design library
Claus Dethlefsen / Region Nordjylland
cld at rn.dk
Thu Jul 15 14:59:29 CEST 2010
Dear List
My question relates to the rms (or Design) package. I have modified the example from help(Glm) to include an offset argument. It works with "glm" but "Glm" gives the error
Error in if (!length(fname) || !any(fname == zname)) { :
missing value where TRUE/FALSE needed
# -- begin example
library(rms)
of <- 100:92
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
f <- glm(counts ~ outcome + treatment, family=poisson(),offset=of)
f
anova(f)
summary(f)
f <- Glm(counts ~ outcome + treatment, family=poisson(),offset=of)
# -- end example
The same error occurs using glmD from the Design package.
I use R version 2.11.1 for Windows and have installed the "rms" package together with Design and Hmisc.
Is this a bug or am I missing something?
Best regards,
Claus
----------------------------------------
Claus Dethlefsen, MSc, PhD
Biostatistician at Center for Cardiovascular Research
Aalborg Hospital, Aarhus University Hospital, Denmark
More information about the R-help
mailing list