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
--
Dear list members,
I realize that this is perhaps more of a conceptual issue than a practical
one, but I wonder how would you deal with survey responses such as "don't
know" or "not applicable." Specifically:
(1) Do you regard "don't know" and "not applicable" as missing?
(2) If not, do you regard them as valid responses as other options (e.g., a
scale of 1 to 7), and use all these values to impute missing data? That is,
if someone did not answer this item, the imputed value could be don't know,
not applicable, or any value from 1 to 7. If this is the correct approach,
how to do it in Amelia or other software?
(3) Is it possible to only impute the "true" missing data (i.e., not for
"don't know" or "not applicable" responses), with valid responses from 1 to
7 in Amelia or other software? (Listwise removing participants who select
"don't know" or "not applicable" in one variable before imputing is not a
good idea because those participants may contribute to MAR/MCAR missing in
other variables.)
(4) Are there other approaches to deal with "don't know" or "not
applicable" responses?
Many thanks for your help!
Gu
--
Gu Li, PhD
Visiting International Research Scholar
University of British Columbia
E-mail: guli(a)alumni.ubc.ca; ligu.sysu(a)gmail.com