How to keep variables in regression and make them significant (p<0.05)

Reply
New Contributor
Posts: 3

How to keep variables in regression and make them significant (p<0.05)

I've been trying to figure out how to create indices for my variables to use it in a loop in order to have different regression models similar to backward elimination.

Y (dependent variable)

Xi (independent variables) i=1,2,3,.....10 e.g.

Then I am interested in keeping  the first two variables X1, X2 always in the model and try to find which of the rest giving the X1 significant (p<0.05) (the first hit-so close to 0.05 but less than 0.05) and/or the X2 by starting with all variables in the model (e.g all 10)  and I am not care about F-statistic for the whole model .

I would like to use a macro for this

Many thanks in advance

George

Ask a Question
Discussion stats
  • 0 replies
  • 6593 views
  • 0 likes
  • 1 in conversation