Displaying 1 result from an estimated 1 matches for "ofvar".
Did you mean:
2fvar
2011 Apr 07
1
Automated Fixed Order Stepwise Regression Function
...]+m[,3])
mod3<-lm(m[,1]~m[,2]+m[,3]+m[,4])
mod4<-lm(m[,1]~m[,2]+m[,3]+m[,4]+m[,5])
#Comment 1--I don't know how to automated this process(above) of adding
#...additional variables. Probably a loop is needed but I don't understand
#...how to apply it here. Maybe update.model [1:num.ofvar]?
a1<-anova(mod1)
a2<-anova(mod2)
a3<-anova(mod3)
a4<-anova(mod4)
#Comment 2--SAME AS COMMENT 1 except applied to the anova tables. How do I make
#...[R] add a5, a6...an as necessary?
rb<-rbind(a1,a2,a3,a4)
#Comment 3--again I can't automate this to make the addition of a...