Thanks James!
I'm almost ashamed to admit it, but I didn't have the cord plugged in.
On that note, the separate = FALSE function in the write.amelia command, for example:
write.amelia(obj=bgdata.mi, separate = FALSE, file.stem = "bgdata.mi", format =
"dta")
Will also not work unless you have the new version of R. I ended up using the append
manually in Stata yesterday, but had I been using the newest version of R, I could have
avoided that! Thanks again.
-Kyle
-----Original Message-----
From: JAMES HONAKER [mailto:tercer@psu.edu]
Sent: Monday, 23 April 2012 2:25 AM
To: Kyle Peyton
Cc: amelia(a)lists.gking.harvard.edu
Subject: Re: [amelia] Issues w/ mi.meld() in R
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