Displaying 1 result from an estimated 1 matches for "regrm".
Did you mean:
regr
2003 Jul 01
1
step-wise and prediction
I would like to know how to use the function step with "for" in order
to predict.
Id est:
Let M , A, B ,C be vectors of length 15
for(i in 1:5)
{
regrM<-lm(M[(1+i):(10+i)]~A[(1+i):(10+i)]+B[(1+i):(10+i)]+C[(1+i):
(10+i)])
sregrM<-step(regrM)
and then I would like to compute the predicted value : M* of M, using
the predictors selected by the function step.
For example if i=1 and step gives us the model M~A,
then in the "for", I w...