search for: imputation

Displaying 20 results from an estimated 188 matches for "imputation".

2008 Oct 29
Help with impute.knn
ear all, This is my first time using this listserv and I am seeking help from the expert. OK, here is my question, I am trying to use impute.knn function in impute library and when I tested the sample code, I got the error as followingt: Here is the sample code: library(impute) data(khanmiss) khan.expr <- khanmiss[-1, -(1:2)] ## ## First example ## if(exists(".Random.seed"))
2010 Aug 10
Multiple imputation, especially in rms/Hmisc packages
Hello, I have a general question about combining imputations as well as a question specific to the rms and Hmisc packages. The situation is multiple regression on a data set where multiple imputation has been used to give M imputed data sets. I know how to get the combined estimate of the covariance matrix of the estimated coefficients (average the M covar...
2003 Jul 27
multiple imputation with fit.mult.impute in Hmisc
I have always avoided missing data by keeping my distance from the real world. But I have a student who is doing a study of real patients. We're trying to test regression models using multiple imputation. We did the following (roughly): f <- aregImpute(~ [list of 32 variables, separated by + signs], n.impute=20, defaultLinear=T, data=t1) # I read that 20 is better than the default of 5. # defaultLinear makes sense for our data. fmp <- fit.mult.impute(Y ~ X1 + X2 ... [for the model of inte...
2011 Mar 31
fit.mult.impute() in Hmisc
I tried multiple imputation with aregImpute() and fit.mult.impute() in Hmisc 3.8-3 (June 2010) and R-2.12.1. The warning message below suggests that summary(f) of fit.mult.impute() would only use the last imputed data set. Thus, the whole imputation process is ignored. "Not using a Design fitting function; summary(fi...
2011 Dec 02
Imputing data
So I have a very big matrix of about 900 by 400 and there are a couple of NA in the list. I have used the following functions to impute the missing data data(pc)<-pc pc.roughfix <- na.roughfix( pc.narf <- randomForest(, na.action=na.roughfix) yet it does not replace the NA in the list. Presently I want to replace the NA with maybe the mean of the rows or columns or
2006 Sep 25
Multiple imputation using mice with "mean"
Hi I am trying to impute missing values for my data.frame. As I intend to use the complete data for prediction I am currently measuring the success of an imputation method by its resulting classification error in my training data. I have tried several approaches to replace missing values: - mean/median substitution - substitution by a value selected from the observed values of a variable - MLE in the mix package - all available methods for numerical data...
2013 Jan 14
Changing MaxNWts with the mi() function (error message)
...ting the variable, "sex," the mi() function accesses the mi.categorical() function, which then accesses the nnet() function. I then receive the following error message (preceded by my code below): > imputed.england=mi(england.pre.imputed, n.iter=6, add.noise=FALSE) Beginning Multiple Imputation ( Mon Jan 14 13:39:49 2013 ): Iteration 1 Chain 1 : sex Error while imputing variable: sex , model: mi.categorical Error in nnet.default(X, Y, w, mask = mask, size = 0, skip = TRUE, softmax = TRUE, : too many (3432) weights The error message indicates that there are too many weights (3432)....
2011 Aug 01
Impact of multiple imputation on correlations
Dear all, I have been attempting to use multiple imputation (MI) to handle missing data in my study. I use the mice package in R for this. The deeper I get into this process, the more I realize I first need to understand some basic concepts which I hope you can help me with. For example, let us consider two arbitrary variables in my study that have the fol...
2003 Jul 25
Difficulty replacing NAs using Hmisc aregImpute and Impute
...aframe. I have read the help pages and example in above sited pdf file, but to no avail. Here is example of what I did. Ph, my data frame, is attached. > xt <- aregImpute (~ q5 + q22rev02 + q28a, n.impute=10, x=T, data=Ph) Iteration:1 2 3 4 5 6 7 8 9 10 11 12 13 > impute(xt) Multiple Imputation using Bootstrap and PMM aregImpute(formula = ~q5 + q22rev02 + q28a, data = Ph, n.impute = 10, x = T) Method: ace n= 406 p= 3 Imputations: 10 Number of NAs: q5 q22rev02 q28a 0 88 51 R-squares for Predicting Non-Missing Values for Each Variable Using Last I...
2013 Feb 14
Plotting survival curves after multiple imputation
I am working with some survival data with missing values. I am using the mice package to do multiple imputation. I have found code in this thread which handles pooling of the MI results: Now I would like to plot a survival curve using the pooled results. Here is a reproducible example: require(survival) require(mice) set....
2003 Jun 16
Hmisc multiple imputation functions
Dear all; I am trying to use HMISC imputation function to perform multiple imputations on my data and I keep on getting errors for the code given in the help files. When using "aregImpute" the error is; >f <- aregImpute(~y + x1 + x2 + x3, n.impute=100) Loading required package: acepack Iteration:1 Error in .Fortran("wc...
2005 May 26
PAN: Need Help for Multiple Imputation Package
Hello all. I am trying to run PAN, multilevel multiple imputation program, in R to impute missing data in a longitudinal dataset. I could successfully run the multiple imputation when I only imputed one variable. However, when I tried to impute a time-varying covariate as well as a response variable, I received an error message, “Error: subscript out of bounds....
2012 Oct 30
Amelia imputation - column grouping
Hi everybody, I am quite new to data imputation, but I would like to use the R package ' Amelia II: A Program for Missing Data '. However, its unclear to me how the input for amelia should look like: I have a data frame consisting of numerous coulmns, which represent different experimental conditions, whereby each column has 3 replicat...
2004 Sep 01
Imputing missing values
Dear all, Apologies for this beginner's question. I have a variable Price, which is associated with factors Season and Crop, each of which have several levels. The Price variable contains missing values (NA), which I want to substitute by the mean of the remaining (non-NA) Price values of the same Season-Crop combination of levels. Price Crop Season 10 Rice Summer 12
2011 Dec 13
snpStats imputed SNP probabilities
Hi, Does anybody know how to obtain the imputed SNP genotype probabilities from the snpStats package? I am interested in using an imputation method implemented in R to be further used in a simulation study context. I have found the snpStats package that seems to contain suitable functions to do so. As far as I could find out from the package vignette examples and its help, it gives the 'dosage' as the output which is the expec...
2011 Jan 31
Rubin's rules of multiple imputation
Hello all, if I have multiple imputed data sets, is there a command or function in R in any package you know of to combine those, I know one common MI approach is rubins rules, is there a way to do this using his rules or others? I know theres ways, like using Amelia from Gary King's website to create the imputed data sets, but how to make them into one or combine them for analysis.
2010 Jul 14
Changing model parameters in the mi package needs a higher threshold than 1500. Is there a way that I can change the MaxNWts parameter that is being sent to nnet.default()? I've investigated the mi() and functions and cannot see a way. Thanks for your help! Error message and system info below: Beginning Multiple Imputation ( Wed Jul 14 10:25:06 2010 ): Iteration 1 Imputation 1 : min.func* Error while imputing variable: min.func , model: mi.categorical Error in nnet.default(X, Y, w, mask = mask, size = 0, skip = TRUE, softmax = TRUE, : too many (2608) weights System is Mac OS X 10.5.8, R version 2.9.2 An...
2009 Apr 22
Multiple imputations : wicked dataset ? Wicked computers ? Am I cursed ? (or stupid ?)
Dear list, I'd like to use multiple imputations to try and save a somewhat badly mangled dataset (lousy data collection, worse than lousy monitoring, you know that drill... especially when I am consulted for the first time about one year *after* data collection). My dataset has 231 observations of 53 variables, of which only a very few has no...
2007 Jul 17
Multiple imputation with plausible values already in the data
...the posting guide does not forbid asking non-R questions (even encourages it to some degree), I though I'd give it a try. I am currently doing some secondary analyses of the PISA ( student data. I would like to treat missing values properly, that is using multiple imputation (with the mix package). But I am not sure how to do the imputation, since the data set provided by the OECD already contains variables with plausible values. Roughly, the situation is like this: for each of the cognitive (achievement) scales, there are five variables holding plausible values. So f...
2007 Sep 24
longitudinal imputation with PAN
Hello all, I am working on a longitudinal study of children in the UK and trying the PAN package for imputation of missing data, since it fulfils the critical criteria of taking into account individual subject trend over time as well as population trend over time. In order to validate the procedure I have started by deleting some known values ?we have 6 annual measures of height on 300 children and I have i...