search for: imputed

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

Did you mean: impute
2008 Oct 29
Help with impute.knn 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")) rm(.Random.seed) khan.imputed <- impute.knn(as.matrix(khan.expr)) ## ## khan.imputed$data should now contain the imputed data matrix x<-khan.imputed$data Here are the results: > library(impute) > data(khanmiss) > khan.expr <- khanmiss[-1, -(1:2)] > ## ## First example > ## if(exists(".Random....
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 covariance matrices from the individual imputations and add (M+1)/M times the between-imputation covariance matrix), and I know how to use this to get p-values and confidence...
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
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(fit) will use standard errors, t, P from last imputation only. Use vcov(fit) to get the correct covariance matrix, sqrt(diag(vcov(fit))) to get s.e." But the standard er...
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 -
2013 Jan 14
Changing MaxNWts with the mi() function (error message)
...ata with the mi() function (mi package) and keep receiving an error message. When imputing 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 m...
2011 Aug 01
Impact of multiple imputation on correlations
...ace my missing data when such large fractions are not available? Plot 1 ( provides a scatter plot of these example variables in the original data. The correlation coefficient r = -0.34 and p = 0.016. Q2. I notice that correlations between variables in imputed data (pooled estimates over all imputations) are much lower and less significant than the correlations in the original data. For this example, the pooled estimates for the imputed data show r = -0.11 and p = 0.22. Since this seems to happen in all the variable combinations that I have looked at, I...
2003 Jul 25
Difficulty replacing NAs using Hmisc aregImpute and Impute
Hello R experts I am using Hmisc aregImpute and Impute (following example on page 105 of The Hmisc and Design Libraries). *My end goal is to have NAs physically replaced in my dataframe. 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,
2013 Feb 14
Plotting survival curves after multiple imputation create some missing values in the data dt <- colon dt$rx[sample(1:nrow(dt),50)] <- NA dt$sex [sample(1:nrow(dt),50)] <- NA dt$age[sample(1:nrow(dt),50)] <- NA imp <-mice(dt) fit.imp <- coxph.mids(Surv(time,etype)~rx + sex + age,imp) # Note, this function is defined below... imputed=summary.impute(pool.impute(fit.imp)) print(imputed) # now, how to plot a survival curve with the pooled results ? ########## begin code from linked thread above coxph.mids <- function (formula, data, ...) { call <- if (!is.mids(data)) stop("The data must hav...
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("wclosepw", as.double(w), as.double(x),
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.” Can anyone tell if my commands contain any mistakes? First I imported SAS dataset ‘sim’ which includes a response variable ‘MIY1’,...
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 replicates. I want amelia to perform an imputation across
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 packag...
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...
2010 Jul 14
Changing model parameters in the mi package
I am trying to use the mi package to impute data, but am running into problems with the functions it calls. For instance, I am trying to impute a categorical variable called "min.func." The mi() function calls the mi.categorical() function to deal with this variable, which in turn calls the nnet.default() function, and passes it a fixed parameter MaxNWts=1500. However, as
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 missing data. Most variables have 5-10% of
2007 Jul 17
Multiple imputation with plausible values already in the data
...e of the plausible value variables, but all of the "normal" variables. So e.g. the first data set would include pv1math, pv1read, HISEI, and gender; while the second would include pv2math, pv2read, HISEI, and gender. I would run mix on the five data sets independently and end up with five imputed data sets with no missing values. But is this a valid approach? There would actually be two imputation runs per data set: one for the plausible values on the achievement scales (done by the OECD under an unknown model), and one for the other variables (done by me with mix). The second run would us...
2007 Sep 24
longitudinal imputation with PAN
...n 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 imputed the missing values using PAN and compared the imputed values to the real values I deleted - in most individuals the imputed values fit the individual trend extremely well! However, when looking at the trend over time for a handful of individuals, the imputed value was actually lower than the previo...