[R] names of model coefficients etc
David Firth
david.firth at nuffield.oxford.ac.uk
Fri Sep 28 15:08:34 CEST 2001
I am curious about the reason for the following:
> xzw<-lm(y ~ x+cbind(z,w))
> names1<-names(xzw$coefficients)
> names1
[1] "(Intercept)" "x" "cbind(z, w)z" "cbind(z, w)w"
> names2<-colnames(as.matrix(xzw$model))
> names2
[1] "y" "x" "cbind(z, w).z" "cbind(z, w).w"
> names1==names2
[1] FALSE TRUE FALSE FALSE
It would be helpful for some purposes if all components except the
first here could be TRUE. Presumably there is some good reason for
the difference? Can someone please enlighten me?
--
David Firth Phone +44 1865 278544
Nuffield College Fax +44 1865 278621
Oxford OX1 1NF Secretary +44 1865 278553
United Kingdom Email david.firth at nuffield.ox.ac.uk
http://www.stats.ox.ac.uk/~firth/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list