0

First of all I am fairly new to R. So please do not be so harsh in your comments. Thanks in advance for any help/link/how-to/example; those will be much appreciated.

I have a model like this:

b <- lmer(metric1~a+b+c+d+e+f+g+h+i+j+k+l+(1|X) + (1|Y), data = dataset)

And by using

drop1 (b, test="Chisq")

I have to check AIC and p values in each step. I eliminate the variable with the lowest AIC in each step.

However, I have more than 100 metrics. Doing this with 100 metrics and 12 variables is a big mess.

Although I am not a statistics guru, I already know that AIC and q values are not the best way for model decision (I already read a few documents, discussing with AIC/p values). However, I will not use this models to formulate anything. They will just help me to judge which metrics respond to variables.

So, I wonder if it is possible to this drop1 thing automatically?

merv
  • 67,214
  • 13
  • 180
  • 245
borgs
  • 3
  • 5
  • you could write a loop of some sort. I've found the difficulty with such automated system for mixed-effects models is non-convergence, so you need to have some sort of strategy for that which complicates things. [ ps there are a couple of mixed-model lasso packages that can be used for selection of fixed effects that may be preferable] – user20650 Mar 31 '17 at 00:18
  • would you please share the names/links for those lasso packages? and if possible with commands for R... and secondly I need something that works with lmer. I have random effects in my dataset. – borgs Mar 31 '17 at 00:25
  • never use but `lmerTest` has step funciton, I seem to remember another package has one but ... . Lasso packages lmmlasso, glmmlasso, MMS – user20650 Mar 31 '17 at 00:36
  • other package for stepwise is in `LMERConvenienceFunctions` .. just found by looking in www – user20650 Mar 31 '17 at 00:42
  • step does not function for lmer :/ Anyway thx for helps. I will dig more for lasso packages. – borgs Mar 31 '17 at 00:48
  • LMERConvenienceFunctions Aha. that sounds cool. I will dig more into that. THanks for kind helps! – borgs Mar 31 '17 at 00:56
  • not `stats::step`, but `lmerTest::step` – user20650 Mar 31 '17 at 00:56

0 Answers0