[R] Hierarchical Regression

Prof Brian D Ripley ripley at stats.ox.ac.uk
Tue Apr 4 12:03:54 CEST 2000


On Tue, 4 Apr 2000, Ragnar Beer wrote:

> Howdy!
> 
> I'm a clinical psychologist desperately trying to get rid of SPSS. I 
> just discovered R and like it quite a lot. The main reason why we're 
> still using SPSS  is the hierarchical regression where you enter 
> bundles of variables into a linear model and get an R-sqare increase 
> tested with an F-test. I already found add1 and drop1 but would 
> rather need addn and dropn. Is there something like that? Or how else 
> can I get what I want?

Please give us an example. If the variables are fitted in the order you
give them you want a sequential anova, which anova() gives on the fitted
object containing all the variables.  Otherwise a for loop around anova
looks to be what you want.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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