Hello,
I have a dataset with a very large number of columns (>10000) and fewer
rows, but still a lot (>4000). I want to impute some data with Amelia for
use in Zelig. I know what variables I am interested in using in the
regressions, but there are a number of missing values, so I was hoping I
could leverage the rest of the dataset to come up with imputations for the
variables of interest.
Hence, I only want to impute missing values in a few columns of my dataset,
rather than spending loads of time imputing all the other values which I
don't need and getting error 34 trying to do this. Problem is that I can't
figure out how to exclude columns from being imputed without excluding them
from the entire analysis.
I guessed this would be straight-forward, but I searched and searched and
came up with nothing, so if anyone can help me sort this out, I would very
much appreciate it.
Thanks,
Drew
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
Dear list members,
I have a question concerning lags and leads - it is easy to tell Amelia for
which variables I want to include lags and leads. But how many lags and
leads does it take into account? Is it customizable? Can only specific leads
be specified, e.g. 3rn, 5th and 10th lead?
Thank you very much in advance!
Tom
--
Bc. Tomáš Kudláček
Junior Researcher
Phytophthora Research Centre
CZ.02.1.01/0.0/0.0/ 15_003/0000453
Department of Forest Protection and Wildlife Management
Faculty of Forestry and Wood Technology
Mendel University in Brno
Zemědělská 3, Brno, 613 00
Tel: +420 775680314
Web: www.mendelu.cz
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
Hi,
I have been using the development version of Amelia for the past few months and finding it very useful (Thanks Matt!).
However since the last two days an installation error pops up when trying to install using the following command:
install.packages("Amelia", repos="http://r.iq.harvard.edu", type = "source")
The error:
Warning: unable to access index for repository http://r.iq.harvard.edu/src/contrib:
cannot open URL 'http://r.iq.harvard.edu/src/contrib/PACKAGES'
Warning message:
package ‘Amelia’ is not available (for R version 3.2.3)
Error in library("Amelia") : there is no package called ‘Amelia’
Execution halted
Would be great if the permissions could be restored so we can continue using the development version.
Thanks a lot,
Nandana Sengupta
University of Chicago, Knowledge Lab
________________________________
From: Matt Blackwell [mblackwell(a)gov.harvard.edu]
Sent: Tuesday, September 29, 2015 9:48 PM
To: Nandana Sengupta; amelia(a)lists.gking.harvard.edu
Subject: Re: [amelia] Error: contrasts can be applied only to factors with 2 or more levels
Hi Nandana,
This is a bug in the current version of Amelia that occurs when listwise deletion eliminates all observations. We have a fix for it in the development version of Amelia. You can find installation instructions for that version here:
https://github.com/IQSS/Amelia
We will be submitting this development version to CRAN in the upcoming weeks.
Cheers,
Matt
~~~~~~~~~~~
Matthew Blackwell
Assistant Professor of Government
Harvard University
url: http://www.mattblackwell.org
On Mon, Sep 28, 2015 at 12:43 PM Nandana Sengupta <nandana(a)uchicago.edu<mailto:nandana@uchicago.edu>> wrote:
Hi,
I am running Amelia on a cleaned up subset of a single round of the National Longitudnal Survey of Youth data.
The subset used in the analysis has 64 variables.
I only kept factor variables with 2 to 10 levels in the subset, but when I run the amelia command I get the following error:
****
Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) :
contrasts can be applied only to factors with 2 or more levels
****
On the other hand the amelia code runs if I specify "incheck = FALSE" in the command options.
I am also able to do multiple imputation on this dataset using other R software but am keen to work with Amelia, since I want to utilize the TSCS aspect of multiple imputation that the software provides.
Could you shed some light on why I am seeing the error above and also if the imputation with errors suppressed is reliable?
Thanks,
Nandana Sengupta
University of Chicago, Knowledge Lab
--
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<mailto:Amelia@lists.gking.harvard.edu>
To unsubscribe from this list or get other information:
https://lists.gking.harvard.edu/mailman/listinfo/amelia