The following information is produced at the end of the help page for
amelia when I type "?amelia" in R 2.5.
<snip> ...
code return code for the function. 0 indicates a successful
run of Amelia. Other codes refer to various problems in
data or settings. Please refer to the error message and the Amelia
manual for help with errors.
message error message. Only appears if return code is not 0.
<snip> ...
The minor problem is that I got a code of "1" back from my imputation,
which according to the note above should indicate an error of some sort.
Consulting the Amelia manual says that a code of "1" is normal, however.
Therefore, I think that the R-help page should be updated and the "0"
code changed to a "1" so that others don't get confused.
Thanks,
Brant Inman
Mayo Clinic
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia
hi,
i have a problem with amelia II on time series like this:
Date Value
1 1988-01-02 2.490
2 1988-02-02 2.400
3 1988-03-01 2.190
4 1988-04-05 1.720
5 1988-05-02 1.860
6 1988-05-26 2.000
if i try this in R:
amelia(m_reihe,m=5,ts=1,cs=2,polytime=3,intercs=TRUE)
i get this error message:
Amelia Error Code: 28
There are too many cross-sections in the data to use an
interaction between polynomial of time and the cross-section.
if i try this in R:
amelia(m_reihe,m=5,ts=1,cs=2,polytime=3)
i get this message from R:
Amelia Error Code: 37
You have a "factor" variable in the data. You may
have wanted to set this as a ID variable to remove it
from the imputation model or as an ordinal or nominal
variable to be imputed. Please set it as either and
try again.
what ist the problem? cant amelia handle this data? what have i to do that it could handle it?
or do you know an other package for multiple imputation in time series???
best regards falko
_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia
Hi,
I'm working with a very large dataset that has a relatively small amount of
missingness in a few of the variables. (Any one variable has at most, say,
10% missingness). Amelia won't run on the entire thing since R runs out of
memory. This happens even when I pare the dataset down to only those
variables used in the analysis. I can get Amelia to run on 5% subsets of
the data, but even 10% subsets are too large.
So, is the best thing to do here to randomly split the data into 20 5%
chunks and impute separately within each chunk? If so, how should I
recombine the subsets of imputed data to perform my analysis?
Thanks in advance for your help,
Dennis
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia
Hi,
I have a 1995-2004 time-series of epidemiological variables. The other
covariates in the dataset are 1995-2005. Can I impute 2005 values of the epi
time-series?
Thanks!
Andy Stokes
Harvard Initiative for Global Health
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia
Hi all,
I am working on a Mac and hence can't use Amelia View.
For configuration ease, I set up the configuration for an imputation
routine with Amelia View on an old Windows laptop which is now
powerful enough for the calculation. Hence, I need to adapt the R
archive file to run it on my Mac.
When I look into the R archive file created by Amlia View, I wonder
how the case priors (the similarity matrix between cases) are coded
for to be understood by Amelia.
R lets you transform a vector into a matrix by indicating the vector,
number of lines and columns. With my 64 cases (cross-sectional
units), this should produce a vector with the length of 64*64=4096.
Amelia View displays only half of the matrix of n*(n-1)/2 (if I am
not mistaken) to avoid redundancy. How are the redundant fields coded
(do they receive a 0 and Amelia knows that they are redundant values?)?
What made me struggle was that the vector created by Amelia View is
too short to represent the n^2 matrix (it was around 4014 instead of
the 4096 in length and had a few bizarre non integers at the end). So
the question, how does one code the case priors matrix in a R script?
For the priors there is no ambiguity since they consists of a n*n and
not of a n*(n-1)/2 matrix.
I have on additional question: how does one indicate in the R script
that the output is to be written as a .dta ?
Thanks for your help,
Raffael
__________________________________
Raffael Himmelsbach
Institut d'Etudes Politiques et Internationales
Batiment Anthropôle, Bureau 5128
Université de Lausanne
CH-1015 Lausanne
Phone: +41 21 692 31 76
Cell: +41 79 756 85 10
I just installed Amelia as an R package on my Windows XP machine. I am
running R 2.5.
I was checking out Amelia on some classic missing data datasets from
Paul Allison's missing data book (Sage 2002). The dataset for which I am
having problems is called "usnews" and can be found at:
http://www.ats.ucla.edu/stat/books/md/default.htm.
The problem is an error message that I get from Amelia which I think is
refering to a variable with no missing data. Here is a summary of the
variables in the dataset:
>summary(usnews)
csat act stufac gradrat
Min. : 600 Min. : 11.0 Min. : 2.3 Min. : 8.0
1st Qu.: 884 1st Qu.: 20.2 1st Qu.:11.8 1st Qu.: 47.0
Median : 957 Median : 22.0 Median :14.3 Median : 60.0
Mean : 968 Mean : 22.1 Mean :14.9 Mean : 60.4
3rd Qu.:1038 3rd Qu.: 24.0 3rd Qu.:17.6 3rd Qu.: 74.0
Max. :1410 Max. : 31.0 Max. :91.8 Max. :118.0
NA's : 523 NA's :588.0 NA's : 2.0 NA's : 98.0
rmbrd private lenroll
Min. : 1.26 Min. :1.00 Min. :2.89
1st Qu.: 3.32 1st Qu.:1.00 1st Qu.:5.46
Median : 4.00 Median :2.00 Median :6.10
Mean : 4.15 Mean :1.64 Mean :6.17
3rd Qu.: 4.80 3rd Qu.:2.00 3rd Qu.:6.89
Max. : 8.70 Max. :2.00 Max. :8.91
NA's :519.00 NA's :5.00
Here is my imputation model:
> am <- amelia(usnews, m=10, p2s=2, startvals=1, noms='private',
logs='stufac', write.out=T, outname='C:\\...\\usnews-am.csv')
amelia starting
beginning prep functions
running bootstrap
-- Imputation 1 --
setting up EM chain indicies
1(34) 2(33) 3(26) 4(26) 5(26) 6(25) 7(24) 8(24) 9(23)10(22)
11(22)12(20)13(18)14(18)15(17)16(16)17(14)18(14)19(14)20(13)
21(13)22(12)23(12)24(12)25(12)26(12)27(12)28(12)29(12)30(12)
31(12)32(12)33(12)34(12)35(11)36(11)37(11)38(11)39(11)40(11)
41(11)42(11)43(11)44(11)45(11)46(11)47(10)48(10)49(9)50(9)
51(9)52(9)53(9)54(9)55(9)56(9)57(9)58(8)59(8)60(8)
61(8)62(7)63(7)64(7)65(7)66(7)67(7)68(7)69(7)70(7)
71(7)72(7)73(7)74(7)75(7)76(7)77(7)78(7)79(7)80(7)
81(7)82(7)83(7)84(7)85(7)86(6)87(6)88(6)89(6)90(6)
91(6)92(5)93(5)94(5)95(5)96(5)97(5)98(5)99(5)100(5)
101(5)102(5)103(5)104(5)105(5)106(5)107(5)108(5)109(5)110(5)
111(5)112(5)113(5)114(5)115(5)116(5)117(5)118(5)119(5)120(5)
121(5)122(5)123(5)124(5)125(5)126(5)127(5)128(5)129(5)130(5)
131(5)132(5)133(5)134(5)135(5)136(5)137(5)138(4)139(4)140(4)
141(4)142(4)143(4)144(4)145(4)146(4)147(4)148(4)149(4)150(4)
151(4)152(4)153(4)154(4)155(4)156(4)157(4)158(3)159(3)160(3)
161(3)162(3)163(3)164(3)165(3)166(3)167(3)168(3)169(3)170(3)
171(3)172(3)173(3)174(3)175(3)176(3)177(3)178(3)179(3)180(3)
181(2)182(2)183(2)184(2)185(2)186(2)187(2)188(2)189(2)190(2)
191(2)192(2)193(2)194(2)195(2)196(2)197(2)198(2)199(2)200(2)
201(2)202(2)203(2)204(2)205(2)206(2)207(2)208(2)209(2)210(2)
211(2)212(2)213(2)214(2)215(2)216(2)217(2)218(2)219(2)220(2)
221(1)222(1)223(1)224(1)225(0)
Error in impute.default(prepped$x, thetanew$thetanew, priors =
prepped$priors) :
length of vector of imputed values != no. NAs in x
This error only started happening when I identified the variable
"private" as being nominal. Any ideas?
__________________________________________________
Brant A. Inman, MD FRCSC
Urologic oncology fellow, Mayo Clinic College of Medicine
200 First Street SW
Rochester, MN 55901
Phone: (507) 284-2511
Fax: (507) 284-4951
Inman.Brant(a)mayo.edu
__________________________________________________
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia