I have a dataset with 9 continuous independent variables. I'm trying to select amongst these variables to fit a model to a single percentage (dependent) variable, Score
. Unfortunately, I know there will be serious collinearity between several of the variables.
I've tried using the stepAIC()
function in R for variable selection, but that method, oddly, seems sensitive to the order in which the variables are listed in the equation...
Here's my R code (because it's percentage data, I use a logit transformation for Score):
library(MASS)
library(car)
data.tst = read.table("data.txt",header=T)
data.lm = lm(logit(Score) ~ Var1 + Var2 + Var3 + Var4 + Var5 + Var6 + Var7 +
Var8 + Var9, data = data.tst)
step = stepAIC(data.lm, direction="both")
summary(step)
For some reason, I found that the variables listed at the beginning of the equation end up being selected by the stepAIC()
function, and the outcome can be manipulated by listing, e.g., Var9
first (following the tilde).
What is a more effective (and less controversial) way of fitting a model here? I'm not actually dead-set on using linear regression: the only thing I want is to be able to understand which of the 9 variables is truly driving the variation in the Score
variable. Preferably, this would be some method that takes the strong potential for collinearity in these 9 variables into account.
Score
variable", which is the sentence that I may have overly focused on. In the presence of strong collinearity, the lasso is not going to help with that, at least in more strict interpretations of the OP's remark. $\endgroup$