search for: imputationlist

Displaying 7 results from an estimated 7 matches for "imputationlist".

2008 May 30
0
imputationlist, update, and recode
I'm stumbling my way through manipulating data in multiply imputed datasets, and have run into a problem translating code I used to run on my pre-imputed dataset to multiple datasets. The imputation runs just fine, as does the reading of the mi data sets into an imputationList. I run into trouble, though, when I try to construct a scale across all the data sets. Is there a simple way to do this? (here's what I've been trying) vars_to_impute = c("var1", ... "var50") imputed <- amelia(data=vars_to_impute, m=5, outname="miset")...
2008 May 28
1
manipulating multiply imputed data sets
...t1$asian <- recode(miset1$RACE, '3=1; else=0; ') miset1$hispanic <- recode(miset1$RACE, '4=1; else=0; ') miset1$raceother <- recode(miset1$RACE, '5=1; else=0; ') I've tried a number of variations, e.g., on the following using recode (from the car package) with imputationList (from the mitools package), though without success: files.allmisets <- list.files(getwd(),pattern="miset*.csv$",full=TRUE) allmis <- imputationList(lapply(files.allmisets, read.csv)) allmis <- update(allmis, white <- recode(RACE, '1=1; else=0; ')) I've also tried...
2007 Jun 07
1
MITOOLS: Error in eval(expr, envir, enclos) : invalid 'envir' argument
...I am using Amelia, mitools and cmprsk to fit cumulative incidence curves to multiply imputed datasets. The error message that I get "Error in eval(expr, envir, enclos) : invalid 'envir' argument" occurs when I try to fit models to the 50 imputed datasets using the "with.imputationList" function of mitools. The problem seems to occur intermittently, depending on the type of model that I try to fit to the datasets as well as the previous code that has been executed during the R session. I have read the previous postings for similar problems and have tried renaming many of m...
2007 May 31
0
Using MIcombine for coxph fits
....density(data=d, output=am.imp, var='trig') compare.density(data=d, output=am.imp, var='platelet') --------------- Since everything looks ok, fit Cox models to each of the 10 imputed datasets using the functions of the mitools package. --------------- library(mitools) miset <- imputationList(list(am.imp[[1]],am.imp[[2]],am.imp[[3]], am.imp[[4]],am.imp[[5]],am.imp[[6]],am.imp[[7]],am.imp[[8]], am.imp[[9]],am.imp[[10]])) mifit <- with(miset, coxph(Surv(time, status) ~ age + sex + hepmeg + platelet + trt + trig)) mifit --------------- The "mifit" object shows the indivi...
2007 Aug 14
0
Panel data and imputed datasets
...providing a convenient wrapper for fixed and random effects and Hausman tests. And since I've got five datasets, it seemed reasonable that what I wanted to do was to combine these as a big imputation data frame. The plm regression function requires a data argument, and simply using the imputationList result didn't work, nor did calling the names(allhiv) work (that resulted in "imputations" and "call"). Where do I point the plm command to look for the data? Or have I gone about this in entirely the wrong way? Thanks in advance for the help. Best, -N Here's...
2007 Mar 02
1
Mitools and lmer
...imates. Does anyone have any suggestions? The betas and the standard errors were extracted with no problem so everything seems to work smoothly up until that point. > > > Program > #Read data > data.dir<-system.file("dta",package="mitools") > files.imp<-imputationList(lapply(list.files(data.dir, > pattern="imp.\\.dta", full=TRUE), read.dta)) > > #estimate model over each imputed dataset > model0<-with(files.imp,lmer( erq2tnc ~1+trt2+nash+wash+male+coh2+coh3+(1 | > sitebeth))) > #extract betas and standard errors > betas<-MIex...
2007 Aug 15
0
mitools and plm packages
Hi all, I am trying to use the functions in the plm package with multiply imputed datasets. I had tried to combine the datasets using the imputationList() function of mitools. plm, however, requires a data argument, and I don't know where to point it to. I'd appreciate any help people might have. A (possible) fuller description of the problem and code is in a previous message: https://stat.ethz.ch/pipermail/r-help/2007-August/ 1386...