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? --Ragnar -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Ragnar Beer <rbeer at uni-goettingen.de> writes:> 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? > > --RagnarYou can compare any two (nested!!) models with anova(model1,model2) and get the F-test between them. (Currently there's no sanity check that you're actually applying the models to the same data and have a strict ordering of models, but this is rather high up on our TODO list for 1.1.0) If you're thinking in terms of model search procedures, also have a look at step() and the leaps package. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._