Hi Tom,
I think the problem might be that you are missing the latest update of
Amelia (there was a slight change in the syntax from version 1.1-xx to
1.2-xx). In order to get the latest version, try running the following
line of code:
install.packages("Amelia")
This should get you the latest version of Amelia that will fix the
error that you get from Amelia at the command line.
In terms of Zelig, I think that your syntax is incorrect. You should
see that Zelig documentation to get a clear sense of how to implement
your model, but if you want to run a linear model (OLS) with the
specification you've indicated, you can run it like so:
z.out <- zelig(IOP~ICP+CVP+CONCORDANCE, model = "ls", data =
output$imputations)
You shouldn't pass an "lm" object to zelig. You simply specify the
formula and the stochastic model. You can find the documentation for
Zelig at
I hope that helps,
matt.
2009/5/3 Θωμας <blitskasvonarta(a)gmail.com>om>:
Thank you Dr Blackwell,
First thank you for your time and for letting me use Amelia.
I still experience problems:
Lets say the file I need to impute is called mis (attached) and is saved as
a txt file on the desktop.
From the R environment :
misi<-read.table('C:\\Documents and
Settings\\thomas\\Desktop\\mis.txt',
header=T)
output<-amelia(x=misi, empri=10,ords=c(3,4))
this gives me the error :
"Error in amelia(x = misi, empri = 10, ords =
c(3,4)) : unused argument(s) (x = list(Patient = c(1, 1, 1, 1, 1 etc...
if I do
output<-amelia(x, empri=10,ords=c(3,4)) then
it produces imputations
However next at zelig
z.out <- zelig(lm(IOP~ICP+CVP+CONCORDANCE),
data = output$imputations) .
I am getting the error "Error in eval(expr, envir, enclos) : object "IOP"
not found"
Following the instructions at AmeliaView() and z.out <-
zelig(lm(IOP~ICP+CVP+CONCORDANCE), data = output$imputations) I am getting
the error "Error in eval(expr, envir, enclos) : object "IOP" not
found"
Attached is the example file I am using.
Once again thank you for your kindness to let me use Amelia.
Regards,
Tom Spentzas, ΜD, MS
Ass Prof. at UT
On Sun, May 3, 2009 at 2:02 PM, Matt Blackwell <mblackwell(a)gmail.com> wrote:
Hello,
The syntax of Amelia has changed in recent versions. You can run your
code like so:
output<-amelia(x=x, empri=10,ords=c(3,4))
z.out <- zelig(***, data = output$imputations)
where you would replace *** with your model and settings.
If you call AmeliaView() from an R session, you can use the output
option "Hold in R memory". Afterward, you can click on "File" then
"Exit Amelia." Once you are back at the R prompt, you should be able
to find your Amelia output. By default it is named "outdata." In order
to use Zelig:
z.out <- zelig(***, data = outdata$imputations)
I hope this helps. Let us know if you have any more problems.
Thanks for using Amelia!
matt.
On Sun, May 3, 2009 at 11:23 AM, Hylar <blitskasvonarta(a)gmail.com> wrote:
> I am trying to understand how zelig can peak up the imputation files
> generated by amelia . There isn't any example on the ppt course.
> I used output<-amelia(data=x, empri=10,ords=c(3,4)) and I received an
> error
> message "Error in amelia(data = x) : argument "x" is missing, with
no
> default"
> Then I used the AmeliaView () I saved the 5 files on the desktop but I
> do
> not know how to pick them up with the zelig.
> I will appreciate a simple example - first with "output<-amelia(data=x,
> empri=10,ords=c(3,4))" and second with "AmeliaView()"
> Thank you again,
>
>> Tom Spentzas, MD MD
>> Ass Professor Univ of Tennessee.
>
>
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: