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
Hello,
I have no prior experience with Amelia, and am trying to use it to
impute missing observations in column "ON" in the enclosed "1ON.csv"
file. I use only 3 variables: ON, month2 (as time series index),
source2 (as cross-sectional index). So far I have only managed to get
the following alternative error messages:
Amelia Error Code: 33
The time series and cross sectional variables cannot be transformed.
(when I try to transform "month2" into ordinal and "source2" into
nominal variables)
Error in rowSums(AMr1) : 'x' must be an array of at least two dimensions
(with no variable transformation)
I guess the problem might be caused by the file structure. Could
someone help me out? E.g., by sending me a sample input file on which
Amelia works right?
Many thanks in advance, and best regards,
Pawel
Hi,
When I try to load a .csv file (from my R working directory) into Amelia
using Amelia View (launched from R), I get a message in R that says:
Error in setwd(dir) : cannot change working directory
Any ideas why this might be happening?
Thanks,
Bill
**************************************************************************
William F. Mabe, Jr., PhD
Project Director
Heldrich Center for Workforce Development
33 Livingston Ave., 5th floor
Rutgers University
New Brunswick, NJ 08901
(732)932-4100 ext.530
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia
Hi -
I am unclear about why after I set range values using priors dialog I
get values outside the range I set. For example I have four variables
that are percentages, and I set the minimum at 0 and maximum at 100
with a .99 confidence level. However, I still get negative minimum
values and maximum values above 100. I would appreciate any help that
anyone could offer.
Thank you.
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia