I have a model with 13 independent variables (2 of them are categorical variables) and 678 observations. All of the variables are significant.I'm planning to check the coefficients stability. My approach is to start from a model with one variable and find that coefficients. Then I’ll add another variable; however, I'm keeping the previous variable also. I’ll continue until that all variables are in the final model. I'm using the following R code:
add.APV<-lm(HPV~log(APV),data=Mydata) add1(add.APV,scope =~ AWD + Variety.bodyandchassis + Flexibility + Model.types + Year + log(CAC)+ Outsourcing + Platformstrategy + Hourly.total + Newownership + Vehicle.Launch + Segment.MD., test="F", k=2, trace=TRUE)
And I'm getting the following error:
Error in factor.scope(attr(terms1, "factors"), list(add = attr(terms2, : upper scope has term ‘NA’ not included in model
I was wondering what the problem is. Any feedback would be appreciated.