# Regarding analysis of regression result and vif result

I am working on building a regression model. There are 51 points. The number of predictor variables is 37. The following is the result of running lm result. When trying to detecting the multicollinearity issue, the vif also drops the error message. What are the problems of this model.

model1<-lm(test.1[,3] ~ as.matrix(test[,-c(1,2,3)]),data=test)
summary(model1)
vif(model1)
Error in vif.default(model1) : model contains fewer than 2 terms


• Your model is pretty saturated. You can't really use this many variables; you probably want to try something like the LASSO. What are the predictor variables? Are they factors? – gung - Reinstate Monica Nov 8 '14 at 17:35
• gung, thanks for your reply. Some predictor variables are continuous value, while some others are binary variable. When you refer to factors, what do you mean here? I should cast some variables into factors. Please explain more. Thanks. – user785099 Nov 8 '14 at 18:08
• the reason that I am doing vif is to find some correlated variables and remove them from the model. Should I do step-wise variable selection first? – user785099 Nov 8 '14 at 18:09
• No, you should not use step-wise selection, see my answer here: Algorithms for automatic model selection. Try also reading some threads categorized under model-selection & feature-selection. By "factor", I mean a categorical variable w/ multiple levels. – gung - Reinstate Monica Nov 8 '14 at 18:15
• Gung, are there any specific pre-processing steps for handing factor (categorical variables" when having both them and continuous variables? Thanks. – user785099 Nov 8 '14 at 20:40

model1 <- lm(dependent ~ predictor1 + predictor2 + predictor3, data = df)