# Checking regression coefficients' stability?

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.

• You can start by looking for NA's in your data, via. "is.na(add.APV\$scope)" etc. – Alex R. May 10 '16 at 19:57
• Thanks Alex, as far as I know there isn't any missing value; however, I checked your advice also and got "logical(0)". – Amir May 11 '16 at 21:11

numeric <- apply(Mydata,2,is.factor)