Hi Jon,
Sorry for taking so long to get back to you on this. I think I've tracked
this down to your data being from the "tibble" class/package, which didn't
play well with Amelia. I've pushed an update to the development version
that fixes this issue. You can either wait until we push the next version
to CRAN or install the development version by following the instructions
here:
https://github.com/IQSS/Amelia
Hope that helps!
Cheers,
Matt
~~~~~~~~~~~
Matthew Blackwell
Assistant Professor of Government
Harvard University
url:
http://www.mattblackwell.org
On Fri, Feb 10, 2017 at 11:57 AM, Jon Zadra <jon.zadra(a)sorensonimpact.com>
wrote:
Hello,
I am new to amelia and have been unable to find any info on the error I am
receiving:
*> tscsPlot(bd.am.poly1, cs = "Fraud", var = "n")*
*Error: Unsupported use of matrix or array for column indexing*
The data is 3 variables: a date var used for the ts, a grouping var used
for cs, and a count var, "n", which is my outcome variable that requries
imputation.
My initial amelia call looks like this (note that it wasn't clear if
amelia supported datetime objects, so I converted to seconds since epoch -
if it can handle datetime objects and this conversion is unnecessary, it
would be great to know that!):
*>bd.am.poly1 <- amelia(bdsum, idvars = "date", ts = "datenum",
cs =
"call.type", polytime = 1, intercs = T)*
Here's a sample of the data:
date call.type n datenum
<date> <fctr> <dbl> <dbl>
1 2016-08-17 Criminal Mis C NA 17030
2 2014-02-10 TRAFFB-Traffic Complaint NA 16111
3 2015-11-03 WEAPO1B-Weapon I/P 1 16742
4 2016-09-03 Disturbance 0 17047
5 2015-02-24 Assault 0 16490
6 2014-08-06 Unknown Problem 0 16288
7 2014-08-28 INJACC3B-Injury Accident C 0 16310
8 2015-06-11 Recovered Stolen Prop 0 16597
9 2016-02-15 Lost Property 0 16846
10 2015-05-09 Welfare Check 2 16564
Thanks much,
Jon
---
Jonathan Zadra, PhD
Data Scientist
Sorenson Impact Center
David Eccles School of Business, University of Utah
www.sorensonimpactcenter.com
<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.sorensonimpactcenter.com&d=CwMFaQ&c=WO-RGvefibhHBZq3fL85hQ&r=EwICq0J5pL8CwgEJz8qkmauGonk0XmiLpxcYOEgk2a0&m=Zf8jMLwuGvA2Zrp6UBhFCuGgaG6003_oBSsCs0jccyM&s=Q5q7bAotOZ7xsv-Zw4tLMr8HxL2iMScVHQlxRn7Rdxw&e=>
--
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