Dear list & Matt,
After running a successful imputation in AmeliaView I wish to produce a
further few sets of (5) imputations and view the corresponding Diagnostics
for each set. I wish to do this without exiting & restarting AmeliaView.
If I do restart AmeliaView and run an (apparantly) identically specified set
of imputations on identical data I notice that for each set of imputations
the corresponding diagnostic plots vary slightly. I assume this is normal?
However after running a second and subsequent set of imputations the Output
log does not seem to change. Without restarting AmeliaView I change the
output directory before each fresh set of imputations; AmeliaView behaves
well, producing fresh sets of (5) imputations and saving them to the
allocated directory (csv files). However the log does not appear to change
and the diagnostic plots appear identical to those produced for the first
set of imputations. Am I missing something please?
many thanks
Simon UK
Hello,
I have a question about an error code, and whether or not there are options for working around it.
Here is the situation:
I have 4 variables (actually 4 classes of variables) that are linear combinations of each other. Thus, they all cannot be in the imputation model. I am using the "idvars" argument to hold one of these variables out of the imputation process to avoid the "error: inv_sympd(): matrix appears to be singular" message, which I think is related to the fact that these variables are related.
However, when I try to hold one of these variables out of the imputations using the "idvars" argument, I get the message below:
>
Amelia Error Code: 32
Transfomations must be mutually exclusive, so one
variable can only be assigned one transformation. You have the
same variable designated for two transformations.
>
I have been able to get the imputations to run with the following:
1.) Running the imputation with only 3 of 4 the variables
2.) Running the imputation with 3 of the variables included in the imputation, but one left out using "idvars", and specifying incheck=FALSE
Also, the "idvars" argument works just fine when I hold out two ID variables from the imputation...so it is only failing when I also add one of these 4 correlated variables.
The 4 variables I am speaking of are not necessarily important for the imputation process, but are important for the stats I would like to run down the road on the imputed data (thus I need them in the final imputed data set). When I put all 4 of the variables into the "idvars" argument, I get the error related to the number of excluded variables >> number of variables used for imputation.
Any advice on how to handle this problem is greatly appreciated! Thank you!
All the best regards,
Ryan
Good afternoon,
I am student at the Rochester Institute of Technology and I am currently
working with a time-series data set that I am trying to impute, however I
get the following error:
Loading required package: Rcpp
##
## Amelia II: Multiple Imputation
## (Version 1.7.3, built: 2014-11-14)
## Copyright (C) 2005-2015 James Honaker, Gary King and Matthew Blackwell
## Refer to http://gking.harvard.edu/amelia/ for more information
##
amelia starting
beginning prep functions
Variables used: Volume Speed Delay Stops
Error in colSums(sapply(priors[, 1, drop = FALSE], ">", blanks)) :
'x' must be an array of at least two dimensions
Calls: amelia ... amelia.default -> amelia.prep -> amsubset -> colSums
I am calling Amelia with the following command:
amelia(dfMat, m=5, ts=5, priors=priorsMat, bouds=boundsMat, p2s=2)
where dfMat is the data matrix of size 60000x5, where the fifth column is
the time variable, priorsMat is the matrix of observational priors with 4
columns(I specify the mean and deviation for each data point). I've checked
that dfMat and priorsMat have the correct dimensions and thus I am not sure
what could be giving me this error.
I would be very grateful if somebody could give me any pointers as to what
might be the issue.
Thank you very much.
Sincerely,
Michal Kucer
--
Michal Kucer
Rochester Institute of Technology
Dear List Members,
I experience an error when running tscsPlot on an Amelia output with the message:
Error in output$theta[, , ceiling(i/drawsperimp)] :
subscript out of bounds
The error is due to the ceiling function, which for some settings returns wrong results due to floating point arithmetic. In my case m = 6 and draws = 100 resulting in
ceiling(100 / ( (1/6) * 100)) = 7 != 6
so index is out of bounds.
I attached a patch which only uses integer arithmetic and is thus not susceptible to floating point arithmetic errors.
Hope that helps!
Kind regards,
David
I ran Amelia in R-Studio and I got the error below.
I believe the problem variables are labeled as ID vars and I'd like to
leave them as ID vars. If anyone has a solution, please let me know.
Many Thanks,
Error in amelia.default(x, m = 5, idvars = c("caseid", "strata", "prov", :
(list) object cannot be coerced to type 'double'
In addition: There were 20 warnings (use warnings() to see them)
Amelia users,
My data set consists of several environmental predictor variables, each of which are time series with seasonal and trend components. These are monthly values taken over 15 years. I have been experimenting with Amelia and have read the referenced papers and documentation, but two questions remain:
1) What is the best way to indicate the "ts" component? If this is monthly, should I assign sequential numbers to my "Month" column (1-180) indicating 12 months X 15 years and leave "Year" out of the analysis, or should I simply number my months 1-12 for each year and again only select "Month" for ts? If there is both a seasonal and a trend component to the data, will it be captured using either of these methods?
2) All of my variables (both independent and dependent) are time series, and all have missing values. If I do nothing to the data, except for maybe simple transformations to a few variables to better approach normality, are there any major precautions to imputing ts data from all ts data? Of course, I will experiment with polytime, splinetime, lags, etc.
Thank you for your help.
Regards,
Erin Graham
Hello,
The Amelia output file indicates the imputation is successful. But when I
opened up the stacked.dta file, I get this error message "dta file corrupt
The file unexpectedly ended before it should have"
Any ideas?
Thanks
Evelyn
I have multiple time series variables in my data, all with missing values, and I have been experimenting with different lags, leads, polys or splines to find the best "fit" for my dependent variable. However, the treatment that provides the best imputation for one variable performs poorly for other variables. So, is it reasonable to use imputed datasets from different Amelia runs for further analysis, or should a single imputation be selected that does OK for all of the variables, since the variables will be further analyzed together?
For example, if I have variables temperature, salinity and growth. Temp points are imputed best using splines, but do bad using poly=1, while growth does best using poly=1 and bad with splines. Salinity does best w/ poly=3.
Would you do separate runs adjusting these settings, extract the imputed values for the variables that perform well for each setting, and then combine the variables into a new data set?
Thank you for your input
Erin Graham
I reinstalled Amelia, though I was able to impute with an older version of
Amelia.
With the updated version, I continue to get this error code. I'm not sure
what is the problem.
Many Thanks
Evelyn
There was an unexpected error in the execution of Amelia.
Double check all inputs for errors and take note of the error message:
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
0 (non-NA) cases
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
0 (non-NA) cases