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/
I'm trying to run a multinomial logit with Zelig. My dependent variable has three levels, favor, haven't thought, and oppose. However, I'm getting the following error message.
anes96two <- zelig(trade962a ~ age962 + education962 + personal962 + economy962 + partisan962 + employment962 + union962 + home962 + market962 + race962 + income962, model="mlogit", data=data96)
#Error in attr(tt, "depFactors")$depFactorVar :
# $ operator is invalid for atomic vectors
Does anyone have ideas about what could be going on.
Thanks
Abraham
-
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/
We're trying to recreate an analysis done in a book called "The Fate of
Young Democracies" which applies a Weibull model to the duration of
democracies. Two questions:
1) In the book they claim that the hazard function they are using is of the
form h(t | x_t) = pt^{p-1}e^{B0 + x_tB1}. This does not seem to be in the
same form as the hazard function described in either Zelig or Wikipedia.
That hazard function is (roughly) h(y | lambda, alpha) = alpha /
lambda^alpha * y^{alpha - 1) e^{-(y / lambda)^alpha}, where lambda =
e^{Xbeta}. Anyone more familiar with using Weibull models have any clue for
why that difference might exist?
2) The reported values are "percentage change in the baseline hazard rate in
response to a one-unit increase in the independent variable". What would
"baseline" likely constitute in this context, and is there a straightforward
way to calculate this value using Zelig? Does this likely amount to a first
difference on the hazard function after setting covariates to their means,
or something along those lines?
Thanks,
Nick
Unfortunately, these standard errors aren't available for tobit model in
zelig.
Kosuke
--
Department of Politics
Princeton University
http://imai.princeton.edu
On Thu, 18 Mar 2010, Cesar Zucco wrote:
> Hi Kosuke,
>
>
>
> Sorry to write you directly with this issue, but I've been searching for
> an answer this for a while. I found a similar question online, but not
> the actual answer. If there's a known answer somewhere, just point me to
> it and I'll figure it out:
>
>
>
> Are you aware of any potential problem using robust SE and/or clustering
> in Zelig's tobit models?
>
>
>
> Thanks!
>
>
>
> Below are some details, if necessary...
>
>
>
> I'm using Zelig version 3.4-8 and R 2.10.1. I managed to get the exact
> same regressions running using AER's tobit command, but not in zelig.
> Since using Zelig would save me from having to program clarify-like
> routines, I would very much like to get this working in Zelig.
>
>
>
> The basic regression without clustering and robust SE's works fine:
>
>
>
> tob1 <- zelig(mrelideal~relideo+incab, ,model="tobit",data=data.set)
>
>
>
> But if I attempt the robust se's or clustering I get:
>
>
>
>> zelig(mrelideal~relideo+incab, robust =
> TRUE,model="tobit",data=data.set)
>
> Error in 1:nrow(mrelideal) : argument of length 0
>
>
>
>> tob1 <- zelig(mrelideal~relideo+incab, robust = TRUE, cluster="pty",
> model="tobit",data=data.set)
>
> Error in rowsum.default(resid(fit, "dfbeta"), cluster) :
>
> 'x' must be numeric
>
>
>
> I've tried converting pty to numeric, I got rid of rownames, I
> experimented using the name of the data frame with the variables, but I
> get the same errors. Any obvious error or known issue?
>
>
>
> As I mentioned, with AER's tobit it works
>
>
>
> tob1 <- tobit(mrelideal~relideo+incab,data=data.set)
>
> robust.se <- coeftest(tob1, vcov=sandwich) #but not with vcovHC
>
> clustered.se <- clx(x, 1, data.set$pty) #Where the clx is a function I
> found online that is built on coeftest
>
>
>
>
>
> -----------------------------------------------------
>
> Cesar Zucco Jr.
>
> Lecturer in Politics and International Affairs
>
> Princeton University
>
> www.princeton.edu/~zucco
>
> -----------------------------------------------------
>
>
>
>
-
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/
Is the robust = TRUE command incompatible with model ="ologit" ? I keep getting the following error:
mod6 <- zelig(wdlshea ~ initdesch + concap + capasst + logqualrat + terrain
+ straterr + strat1 + strat2 + strat3 + strat4,data=data2, model = "ologit", robust=TRUE)
Error in fn(par, ...) : unused argument(s) (robust = TRUE)
Is there another way to generate the RSE with this model?
Thanks,
Patrick
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/201469227/direct/01/