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/
Good morning
If I run
<<<
susan.lsmixed.out <- zelig(formula = unprot_vag_sex ~ married + age + TREATMENT.ARM*time + highest_grade + income + tag(1|id),
data = susanMI.out$imputations, model = "ls.mixed")
summary(susan.lsmixed.out)
>>>>
I get an error
Error in x$coef : $ operator is invalid for atomic vectors
Searching the archives, I see that others have had similar problems. Is there a workaround?
summary(susan.lsmixed.out[[1]])
works fine; should I then average across the five imputed data sets?
thanks!
Peter
Peter L. Flom, PhD
Statistical Consultant
Website: http://www DOT statisticalanalysisconsulting DOT com/
Writing; http://www.associatedcontent.com/user/582880/peter_flom.html
Twitter: @peterflom
-
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,
I am trying to run a multilevel probit model using Zelig, but keep receiving
the following error message: " in .deparseTag(TT.vars[[vind]]) : wrong use
of tag function!!"
A simplified version of the model I am trying to run is:
z.out <- zelig(formula= list(mu=investment.binary ~ edlevel +
tag(1 + edlevel, gamma | country),
gamma = ~ tag(GDPpc06.full| country)), data=data2006.mod1,
model="probit.mixed")
What I would like to do is allow the intercept and the edlevel variable
listed within the first tag() to vary by country as a function of the
GDPpc06.full variable, all of which are included in the same dataframe. I
followed the syntax here - http://cran.r-project.org/web/packages/Zelig
/vignettes/probit.mixed.pdf - but I think that I am incorrectly specifying
the gamma part of the syntax, which may be causing the error.
I *am* able to get the model to run when I allow the intercept and edlevel
variable to vary using the following syntax:
z.out <- zelig(investment.binary ~ edlevel +
+ tag(1 + edlevel | country),
data=data2006.mod1, model="probit.mixed")
However, this syntax does not allow me to specify that the intercept and
edlevel variable should vary as a function of GDPpc06.full, as in the first
model specified above. I have tried including multiple tags at the
non-group level of the model specification - i.e. one for the intercept and
one for the edlevel variable - but this does not seem to work either.
Do you have any suggestions for how to fix the syntax?
Sincerely,
Jason
--
Jason I. McMann
PhD Student | Department of Politics
Princeton University | jmcmann(a)princeton.edu
I did not set it as a nominal variable, since my DV is the percentage of
vote share received by the nationalist party.
On Sat, Oct 22, 2011 at 12:39 PM, Yph Lelkes <ylelkes(a)stanford.edu> wrote:
> When you imputed the data, did you set your dv in amelia to be nominal?
> That'd would be my other guess.
>
> On Sat, Oct 22, 2011 at 9:37 AM, Sera Choma <sera.onalan(a)gmail.com> wrote:
>
>> Hi Yph,
>> No, I am not. I only set bounds before I imputed my dataset, then I just
>> ran a probit model using Amelia's output. Is this why I am getting the
>> errors?
>> Sera
>>
>> On Sat, Oct 22, 2011 at 12:31 PM, Yph Lelkes <ylelkes(a)stanford.edu>wrote:
>>
>>> Dear Sera,
>>> I'm guessing you're using weights?
>>>
>>> Yph
>>>
>>>
>>> On Sat, Oct 22, 2011 at 9:29 AM, Sera Choma <sera.onalan(a)gmail.com>wrote:
>>>
>>>> Hi,
>>>>
>>>> I am getting the below warning messages from Zelig:
>>>> Warning messages:
>>>> 1: In eval(expr, envir, enclos) :
>>>> non-integer #successes in a binomial glm!
>>>> 2: In eval(expr, envir, enclos) :
>>>> non-integer #successes in a binomial glm!
>>>> 3: In eval(expr, envir, enclos) :
>>>> non-integer #successes in a binomial glm!
>>>> 4: In eval(expr, envir, enclos) :
>>>> non-integer #successes in a binomial glm!
>>>> 5: In eval(expr, envir, enclos) :
>>>> non-integer #successes in a binomial glm!
>>>>
>>>> Background: I am running a probit model where my dependent variable is a
>>>> proportion between 0 and 1 (it is a percentage of votes). I used Amelia to
>>>> overcome my missing data issues.
>>>>
>>>> I'm not sure what the warnings mean. I just want to be certain that I am
>>>> not running an erroneous model.
>>>>
>>>> Thank you for your time and help.
>>>>
>>>> Sera
>>>>
>>>
>>>
>>
>
Hi,
I am getting the below warning messages from Zelig:
Warning messages:
1: In eval(expr, envir, enclos) :
non-integer #successes in a binomial glm!
2: In eval(expr, envir, enclos) :
non-integer #successes in a binomial glm!
3: In eval(expr, envir, enclos) :
non-integer #successes in a binomial glm!
4: In eval(expr, envir, enclos) :
non-integer #successes in a binomial glm!
5: In eval(expr, envir, enclos) :
non-integer #successes in a binomial glm!
Background: I am running a probit model where my dependent variable is a
proportion between 0 and 1 (it is a percentage of votes). I used Amelia to
overcome my missing data issues.
I'm not sure what the warnings mean. I just want to be certain that I am not
running an erroneous model.
Thank you for your time and help.
Sera
Dear Zelig
I came across something a bit disturbing in the ordered probit model of
Zelig (version 3.4-5). More specifically the simulations carried out after a
model estimation
generate coefficients (in $par) for the cutoff-points which are not
correctly ordered for all simulation runs. This obviously makes it
impossible to check the predicted probabilities generated and stored in
qi$ev.
If I do the exactly same thing with oprobit.bayes the gamma-coefficients
(as they are called there) are for each simulation run in the correct
order and the predicted probabilities in qi$ev correspond to what one
would generate with the help of the coefficients in $par.
What is wrong here?
best wishes, simon