Hi Emily,
Unfortunately, we didn't write stepAIC(), so it's not currently
compatible directly.
One approach you could take is to run stepAIC() on each of the imputed
datasets (a.out$imputations[[1]] and the like). Then, use a majority
rule to include terms in the overall model. So, if variable x1
survives the stepwise elimination in 3 or more imputed data sets, then
include it in the final zelig model for combined imputation inference
(the zelig call you currently have). If x1 is eliminated in 3 or more,
then exclude it from that model.
Cheers,
matt.
On Thu, Jan 6, 2011 at 2:38 PM, Emily C <lia.bedelia(a)gmail.com> wrote:
Hi,
I'm trying to use the stepAIC function after creating a model via zelig like
this (where a.out is an amelia object with 5 multiply imputed data sets):
m<-zelig(y ~ x1 + x2 + x3 + x4 + x5, data=a.out$imputations,
model="negbin")
selected<-stepAIC(m, direction="backward")
But it gives me this error at the stepAIC step: "Error in
terms.default(object) : no terms component"
Anyone know how to perform model selection with amelia/zelig?
Thanks in advance!
Emily
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive:
http://lists.gking.harvard.edu/?info=amelia
More info about Amelia:
http://gking.harvard.edu/amelia