Hi,
I'm rather new to Amelia and have some troubles with it. Thus I would be very happy, if you could give me a hint. Here are my problems I'm dealing with:
I have two warning messages coming up when I try to run the imputation command on Amelia (using R) and I don't know how to handle them:
· "You have a small number of observations, relative to the number, of variables in the imputation model. Consider removing some variables, or reducing the order of time polynomials to reduce the number of parameters."
è What would be a good relation of observations to variables? Right now I have 292 observations and 121 variables in the data file. And I do not want to delete more variables, as they are pretty much the fundamental variables I want to do calculations with.
· "The resulting variance matrix was not invertible. Please check your data for highly collinear variables."
è Is Amelia not running properly in the case of collinear variables? Do I have to delete highly correlating variables or is there a way to work around? There are some variables that are very likely to correlate with each other, however I do not want to delete them from the sample as they will be important in further analysis.
Furthermore Amelia imputated 5 times, however data was only printed out in the last one of 5 excel sheets (using the command: write.amelia(obj=a.out, file.stem = "outdata", format = "csv")).
Do you have any idea why there is only data written to the last excel sheet? Or is this already the merged data sheet from all 5 imputations?
Cheers,
Stefanie
Follow us on Facebook: www.facebook.com/TUM.LSO<https://xmail.mwn.de/owa/redir.aspx?C=4f6285cd2ca7472e93498471917db3d0&URL=…>
__________________________________
Dipl.-Psych. Stefanie Ringelhan
Lehrstuhl für Strategie und Organisation
Prof. Dr. Isabell M. Welpe
Fakultät für Wirtschaftswissenschaften
Technische Universität München
Leopoldstrasse 139
D-80804 München (Germany)
Tel.: +49-(0)89-289-24824
Email: s.ringelhan@<mailto:m.mustermann@>tum.de
http://www.strategie.wi.tum.de<https://xmail.mwn.de/owa/redir.aspx?C=4f6285cd2ca7472e93498471917db3d0&URL=…>
Hello,
I'm getting the following error when I try to use moPrep with a proxy:
Error in `[.data.frame`(mf, , proxyname) : undefined columns selected
I've never used moPrep successfully with a proxy, nor could I find any example code that uses a proxy, so there is a really good chance I'm just specifying something wrong. Here is an example using the africa data provided with the package. moPrep works well without a proxy, but with "civlib" specified as a proxy, specified as it seems most natural to me, the command fails.
> data(africa)
> m.out <- moPrep(africa, trade ~ trade, error.proportion = 0.1)
> exists("m.out")
[1] TRUE
> m.out.with.proxy <- moPrep(africa, trade ~ trade | civlib, error.proportion = 0.1)
Error in `[.data.frame`(mf, , proxyname) : undefined columns selected
> exists("m.out.with.proxy")
[1] FALSE
I'm using Amelia 1.6.1 on R 2.15.0, platform: x86_64-pc-mingw32/x64 (64-bit).
Any help or pointers is appreciated.
Thanks so much,
Joe Dieleman
I am having a problem launching Amelia.
R 2.15.0 is installed.
Amelia stated it installed properly, but I only get a command prompt for a brief second.
I am running on Windows 7 Professional Service Pack on a 32 bit platform.
Any ideas?
Kyle,
My first guess is you need to download a newer version of R. Amelia 1.6.1,
which contains the new mi.meld() utility is in the Repositories for R 1.5.0 and
1.4.x, but if you're using 1.3.2 (which is only six months old) when you
install.packages("Amelia") from the 1.3.x repositories you'll be downloading an
older version.
When you type "library("Amelia")" it should read:
> library("Amelia")
Loading required package: foreign
##
## Amelia II: Multiple Imputation
## (Version 1.6.1, built: 2012-03-29)
...
Check that you're getting Version 1.6.1 in that fourth line. This is, exactly
as you say, the "not plugging in the cord" possibility. If it's not that, let
me know and I'll try to work this out.
Thanks,
James
On Sun, Apr 22, 2012 08:47 AM Kyle Peyton <kyle.peyton(a)unimelb.edu.au> wrote:
>
>Hi ,
>
>I'm trying to use the mi.meld() function in Amelia but I'm having issues. I
know this is a new feature (as of March 30th? ) and I have downloaded the most
recent version of Amelia.
>Unfortunately, I receive the following error message when I attempt to use
meld. I'm pasting my code below. It's basically the same thing that's in the
guide. This is ultimately just a test run for something else.
>
>#The imputation process...
>bgdata.mi <- amelia(bg.data, m, ts= "year", cs="ccode", noms =
c("imf_ede","imf_euro","imf_cee","imf_mena",
> "imf_ssa","imf_wh"), polytime = 1, ords = c("p_polity2",
"wdi_trsb","fh_cl","fh_pr") ,
> bounds = bds.cpi, max.resample00)
>
>b.out<-NULL
>se.out<-NULL
>for(i in 1:bgdata.mi$m) {
>ols.out <- lm(ti_cpi ~ lngdpc + p_polity2, data = bgdata.mi$imputations[[i]])
>b.out <- rbind(b.out, ols.out$coef)
>se.out <- rbind(se.out, coef(summary(ols.out))[,2])
>}
>combined.results <- mi.meld(q = b.out, se = se.out)
>combined.results
>
>>From R.
>
>combined.results <- mi.meld(q = b.out, se = se.out)
>Error: could not find function "mi.meld"
>combined.results
>Error: object 'combined.results' not found
>
>I'm just sending this initial e-mail to make sure I haven't done the
equivalent of "not plugged the cord in" with the syntax or something. Would be
very grateful for any suggestions. I've been at it for some time and have hit a
dead end.
>
>Cheers,
>
>Kyle
>
>
>
>
>
>--
>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
https://lists.gking.harvard.edu/mailman/listinfo/amelia
Hi ,
I'm trying to use the mi.meld() function in Amelia but I'm having issues. I know this is a new feature (as of March 30th? ) and I have downloaded the most recent version of Amelia.
Unfortunately, I receive the following error message when I attempt to use meld. I'm pasting my code below. It's basically the same thing that's in the guide. This is ultimately just a test run for something else.
#The imputation process...
bgdata.mi <- amelia(bg.data, m=10, ts= "year", cs="ccode", noms = c("imf_ede","imf_euro","imf_cee","imf_mena",
"imf_ssa","imf_wh"), polytime = 1, ords = c("p_polity2", "wdi_trsb","fh_cl","fh_pr") ,
bounds = bds.cpi, max.resample=1000)
b.out<-NULL
se.out<-NULL
for(i in 1:bgdata.mi$m) {
ols.out <- lm(ti_cpi ~ lngdpc + p_polity2, data = bgdata.mi$imputations[[i]])
b.out <- rbind(b.out, ols.out$coef)
se.out <- rbind(se.out, coef(summary(ols.out))[,2])
}
combined.results <- mi.meld(q = b.out, se = se.out)
combined.results
>From R.
combined.results <- mi.meld(q = b.out, se = se.out)
Error: could not find function "mi.meld"
combined.results
Error: object 'combined.results' not found
I'm just sending this initial e-mail to make sure I haven't done the equivalent of "not plugged the cord in" with the syntax or something. Would be very grateful for any suggestions. I've been at it for some time and have hit a dead end.
Cheers,
Kyle