Unfortunately, I don't think we have an automated procedure for everything. You would have to multiply impute the data, do matching on each imputed data set, and then combine it in zelig() using mi() function. But this does not require any programming. You can simply run the same matching procedure on each data set via matchit() and then feed the resulting multiple matched data sets into zelig().
Good luck,
Kosuke
Department of Politics
Princeton University
http://imai.princeton.edu
On Sep 13, 2011, at 6:02 PM, Pingaul jb wrote:
> Dear Professor,
> I’m a post-doctoral student at Montreal University. I’m actually in Columbia, working and propensity scores with a colleague and using MatchIt and Zelig. First, congratulations for your packages that are very flexible.
>
> My question is about multiple imputation and propensity scores with these softwares. From what I understand, combining both approaches would include:
>
> 1/ Doing multiple imputation and testing which variables to include.
>
> 2/ Propensity score analysis on each imputed data set and pooling the overall balance to check if it is ok (or on each data set?).
>
> 3/ Calculation of the quantities of interest for each data set
>
> 4/ Pooling the quantities across data sets.
>
> I would like to know if there is a written syntax to perform the MatchIt analysis for all of the imputed data set without having to do it manually and check the overall balance. Also, in theory, the number of individuals retained after propensity score matching and the weights can be different for each imputed data set. So that we have to perform the final analysis on each one and then pool the data with a specific procedure to take into account the eventual varying Ns? I normally use Mice package for multiple imputation but it seems that Zelig handle Amelia. My colleague seems to do be able to do all that in stata, but I’m not sure how to make all the three R packages work together.
>
> I would be very happy if you could indicate to me a reference or a place where I can find the syntax to do that (I’ve been using R for some times so I can use packages easily but I have no programming skills).
>
>
> Best Regards!
>
>
>
> Jean-Baptiste
>
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options: http://lists.gking.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
Hello,
Thank you for your past help. I have been able to get ei.RxC working quite
well with R 2.13.0, Zelig 3.5.4 and the dependencies that were made for that
version of R.
After fiddling with ei.RxC for a while, I wondered if it is possible to
output estimations for each precinct. I see that s.out$qi$ev is giving
me the results of each simulation, but the manual seems to suggest that I
can output simulations or estimates for each observation and precinct.
I wondered if it is possible to output an estimate for each observation and
precinct. Further, if I have a precinct number in the file, can I output that
precinct number in a column along with the per-precinct estimates? The idea
would be to map/visualize the estimates for one of the observations.
Figured it was worth asking. I know I've read about folks doing this with
ecological inference models, and wondered if it was possible with ei.RxC in
Zelig.
Thanks again for all of your help.
Cheers,
Matt Clark
Hello,
I'm getting the error that says ei.RxC is not a function in Zelig,
with R 2.15.2 and Zelig 4.
I am in the process of rolling back to Zelig 3.5.*.
I've decided to install R 2.13 and then manually
install all the dependencies from the 2.13 repository.
Is that the correct method? How should I rollback?
Apologies for being very unfamiliar with R.
Cheers,
Matt
*Please, let me know how can I install ZeligMultinomial package. I want to
use mlogit, which according to the manual (page 50), is found in said
package.
I tried with the command,
install.packages("ZeligMultinomial", repos="http://r.iq.harvard.edu/",
type="source")
But received the following message:
Warning: dependency 'MNP' is not available
trying URL '
http://r.iq.harvard.edu/src/contrib/ZeligMultinomial_0.5-4.tar.gz'
Content type 'application/x-gzip' length 9730 bytes
opened URL
==================================================
downloaded 9730 bytes
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_PAPER failed, using "C"
ERROR: dependency 'MNP' is not available for package 'ZeligMultinomial'
* removing
'/Library/Frameworks/R.framework/Versions/2.14/Resources/library/ZeligMultinomial'
The downloaded packages are in
'/private/var/folders/UL/ULLu+bi5GR8IM1G-7XZBJU+++TI/-Tmp-/Rtmp6jw6M9/downloaded_packages'
Warning message:
In install.packages("ZeligMultinomial", repos = "http://r.iq.harvard.edu/",
:
installation of package 'ZeligMultinomial' had non-zero exit status
***
Hi,
I recently updated to 4.0.-11 and was not able to run my scripts
anymore. I noticed that quantities of interest are no longer stored in
$qi$ev, but as a list at $qi. Simulating multiple covariate vectors [eg
setx(m1, var1=seq(1,100,1)] doesn't seem to work, $qi is empty.
I reverted back to 3.5.3 so no big deal and still have to take a closer
look at the documentation for 4.0... Is this a bug or a feature of Zelig
4.0?
Thanks
Steffen
Hi there,
I intended to visualise some basic survival models
in zelig (coxph, weibull).
The code worked fine before updating to Zelig 4.
I get the following error message:
** The model "weibull" is not available with the currently loaded packages,
** and is not an official Zelig package.
** The model's name may be a typo.
Error in get(zelig2, mode = "function") :
object 'zelig2weibull' of mode 'function' was not found
Despite installing and loading all zelig packages
, the error remains.
Anybody with an easy answer to that?
Survival models keep being supported in Zelig 4, right?
Which is the package for that? I presumed ZeligMisc...
Thanks so much!
Best
Chris
Dear all,
Since upgrading to version 4, I am getting errors on every simple sim()
command (the very same commands worked fine under the previous
version). The error I receive is:
Error in link.inverse(eta) :
Argument eta must be a nonempty numeric vector
I suspect that the problem is the setx() function, which now seems to
return a dataframe-length result rather than a vector of the length of
the number of variables in the model. I found nothing in the new
documentation that explains this. I have trimmed down my model to a
very simple one, with the following code:
z.out <- zelig(y~x1+x2, model = "logit", data = ds)
x.prac <- setx(z.out, x1= 4)
x.noprac <- setx(z.out, x1= 1)
diff.prac <- Zelig:::sim(z.out, x = x.noprac, x1 = x.prac)
The model runs correctly, and summary(z.out) returns the correct
output. The setx() commands don't return an error, but the sim()
command does, presumably because it's using incorrect values for the x
and x1 parameters.
Is there something I am doing incorrectly, or have the rules changed in
version 4?
Thanks,
Michael Hoffman