[R] Hierarchical Regression

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Apr 4 13:49:11 CEST 2000


Ragnar Beer <rbeer at uni-goettingen.de> writes:

> I want to know how much variance of pre/post-changes in relationship 
> satisfaction can be explained by changes in iv1 and iv2 (dv ~ iv1 + 
> iv2), by changes in iv3 and iv4 (dv ~ iv3 + iv4) and I want to know 
> wether a model including all of the iv's explains a significant 
> amount of variance over these two models (dv ~ iv1 + iv2 + iv3 + iv4).

OK, that would be easiest done by 

model.0  <- lm(dv ~ 1)
model.A  <- lm(dv ~ iv1 + iv2)
model.B  <- lm(dv ~ iv3 + iv4)
model.AB <- lm(dv ~ iv1 + iv2 + iv3 + iv4)

anova(model.AB, model.A, model.0)
anova(model.AB, model.B, model.0)

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



More information about the R-help mailing list