[Rd] matching predictors and dummies

Jeroen Ooms j.c.l.ooms at uu.nl
Fri Jul 11 21:20:19 CEST 2008



Charles C. Berry wrote:
> 
> See
>  	?terms
>  	?terms.object
> 
> 
> 

I am sorry but i cannot figure out how i can find out which coefficients
belong to which predictors using the model$terms. If i do
attributes(model$terms) i get a nice list which contains the orriginal
factors and some more information, and from model$xlevels i can see the
levels of these factors. However, it does not say anywhere which of the
model$coefficients belong to which factor. The only thing i can imagine is
assuming that the dummy names are simply the concatenation of the factor
name and the level name, which seems to be the default behavior. But
preferebly i would not want to make my program rely on this assumption. How
could i use the model$terms to extract which coefficients belong to which
factor, the way anova() does it?

-- 
View this message in context: http://www.nabble.com/matching-predictors-and-dummies-tp18405023p18410832.html
Sent from the R devel mailing list archive at Nabble.com.



More information about the R-devel mailing list