Skip to content
Back to formatted view

Raw Message

Message-ID: <a0501040bb7da2378d939@[163.1.41.88]>
Date: 2001-09-28T13:08:34Z
From: David Firth
Subject: names of model coefficients etc

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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._