Hi Michal,
Thanks for catching this. I tracked this down to a bug when there are
priors specified and a single "blank" observation in the data set (where
all variables are NA). I've committed a fix to the bug for the next version
of Amelia, but you could also remove the blank row from your dataset with
the following code:
dfMat <- dfMat[rowSums(!is.na(dfMat)) > 0,]
Hope that helps!
Cheers,
Matt
~~~~~~~~~~~
Matthew Blackwell
Assistant Professor of Government
Harvard University
url:
http://www.mattblackwell.org
On Mon, Mar 2, 2015 at 3:48 PM MICHAL KUCER (RIT Student) <mxk7721(a)rit.edu>
wrote:
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
--
Amelia mailing list served by HUIT
[Un]Subscribe/View Archive:
http://lists.gking.harvard.edu/?info=amelia
More info about Amelia:
http://gking.harvard.edu/amelia
Amelia mailing list
Amelia(a)lists.gking.harvard.edu
To unsubscribe from this list or get other information:
https://lists.gking.harvard.edu/mailman/listinfo/amelia