search for: imp2

Displaying 8 results from an estimated 8 matches for "imp2".

Did you mean: imp
2010 Aug 10
1
Multiple imputation, especially in rms/Hmisc packages
...set.seed(1) x1 <- rnorm(40) x2 <- 0.5*x1 + rnorm(40,0,3) y <- x1^2 + x2 + rnorm(40,0,3) x2[40] <- NA # create 1 missing value in x2 a <- aregImpute(~ y + x1 + x2, n.impute=2, nk=3) # 2 imputations x2.imp1 <- x2; x2.imp1[40] <- a$imputed$x2[,1] # first imputed x2 vector x2.imp2 <- x2; x2.imp2[40] <- a$imputed$x2[,2] # second imputed x2 vector ols.imp1 <- ols(y ~ rcs(x1,3) + x2.imp1) # model on imputation 1 ols.imp2 <- ols(y ~ rcs(x1,3) + x2.imp2) # model on imputation 2 d <- data.frame(y, x1, x2) fmi <- fit.mult.impute(y ~ rcs(x1,3) + x2, ols, a, da...
2004 Jul 21
1
function ms
Dear R users, I am using the MICE package. Specifically, at some point in my code I have imp2=mice(PoptotalMICE,imputationMethod="logreg2") And R returns... iter imp variable 1 1 MICEYError in logitreg(xobs, yobs, intercept=F) : couldn't find function "ms" I have been looking for this ms function on the web, hoping it was just a matter of download...
2012 Apr 25
2
Accessing a list
Hi, I have the following problem- I want to access a list whose elements are imp1, imp2, imp3 etc I tried theusing the paste comand in a for loop see the last for loop below. But I keep calling it df but df = imp1 (for the first run). Any ideas on how I can access the elements of the list? Isaac require(Amelia) library(Amelia) data.use <- read.csv("multiplecarol.CSV",...
2013 Jan 28
6
Thank you your help.
Hi, temp3<- read.table(text=" ID CTIME WEIGHT HM001 1223 24.0 HM001 1224 25.2 HM001 1225 23.1 HM001 1226 NA HM001 1227 32.1 HM001 1228 32.4 HM001 1229 1323.2 HM001 1230 27.4 HM001 1231 22.4236 #changed here to test the previous solution ",sep="",header=TRUE,stringsAsFactors=FALSE) ?tempnew<- na.omit(temp3) ?grep("\\d{4}",temp3$WEIGHT) #[1] 7 9 #not correct
2012 Mar 07
0
Multiple imputation using mice
...ome huge out of range values. Here are summary statistics before and after imputation: > summary(aux$emitters) #original data Min. 1st Qu. Median Mean 3rd Qu. Max. NA's 0.00219 2.10200 7.33800 17.87000 23.15000 136.20000 52.00000 > summary(complete(imp2)$emitters) #imputation 1 Min. 1st Qu. Median Mean 3rd Qu. Max. -68.920 2.062 10.000 19.980 32.980 136.200 > summary(complete(imp2,2)$emitters) #imputation 2 (looks better) Min. 1st Qu. Median Mean 3rd Qu. Max. -30.650 1.848 8.808 20.480 32.980 136.200 etc....
2012 Oct 03
0
calculating gelman diagnostic for mice object
...m using -mice- for multiple imputation and would like to use the gelman diagnostic in -coda- to assess the convergence of my imputations. However, gelman.diag requires an mcmc list as input. van Buuren and Groothuis-Oudshoorn (2011) recommend running mice step-by-step to assess convergence (e.g. imp2 <- mice.mids(imp1, maxit = 3, print = FALSE) ) but this creates mids objects. How can I convert the mids objects into an mcmc list? Or is the step-by-step approach wrong here? thanks, Rachel [[alternative HTML version deleted]]
2009 Mar 27
0
read.table on long lines buggy (PR#13626)
...1, ERD1, EXG1, FBA1, FBP1, FBP26, FDH1, FKS1, GAC1, GAL1, GAL10, GAL2, GAL3, GAL4, GAL7, GAL80, GCY1, GDA1, GDB1, GFA1, GIP2, GLC3, GLC7, GLC8, GLG1, GLG2, GLK1, GLO2, GLO4, GNA1, GND1, GND2, GNT1, GPH1, GPM1, GRE3, GSC2, GSY1, GSY2, GTB1, GUT2, HAP4, HKR1, HOC1, HOR2, HPF1, HXK1, HXK2, HXT4, ICL1, IMP2', INM1, INM2, ITR1, KAR2, KEG1, KNH1, KRE2, KRE5\nc:ABC1") > read.table("tst1", sep=":", stringsAsFactors=F)[,1] [1] "c" Warning message: In read.table("tmp1", sep = ":", stringsAsFactors = F) : incomplete final line found by readTable...
2012 Oct 26
0
combined output with zelig is not working!?!
...e quite dated and none really related to my problem. I have been tirelessly working with zelig and unfortunately i am getting real stuck! here is my R code: ###these are my 5 imputed datasets#### d.1 <- read.table("imp1.csv", header=TRUE,sep=",") d.2 <- read.table("imp2.csv", header=TRUE,sep=",") d.3 <- read.table("imp3.csv", header=TRUE,sep=",") d.4 <- read.table("imp4.csv", header=TRUE,sep=",") d.5 <- read.table("imp5.csv", header=TRUE,sep=",") #####my zelig code##### model3=zel...