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
Hey all-
I just had to reinstall R, and in attempting to re-install Zelig from
the R prompt using this command...
source("http://gking.harvard.edu/zelig/install.R")
...I get this error
Error in file(file, "r", encoding = encoding) :
cannot open the connection
In addition: Warning message:
In file(file, "r", encoding = encoding) :
cannot open: HTTP status was '404 Not Found'
Thoughts?
Thanks much,
-c
--
Casey A. Klofstad
University of Miami, Political Science
http://www.as.miami.edu/personal/cklofstad
************
Please check out my book at: http://www.temple.edu/tempress/titles/2099_reg.html
-
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 running the following model to check for non-linearity
zelig(month~s(diag),data=kp2,model="normal.gam")->so.g
I'd like to simulate the month values for the diag value between 40 and 60. S
ubsequently I do:
df2<-setx(so.g,diag=14:60)
dfsim2<-sim(so.g,df2)
This rewards me with:
Error in coef %*% t(x) : non-conformable arguments
Any ideas?
/M
-
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/
Hi all,
I am using the Zelig package in R with a log-log regression model similar to the
following:
z.out <- zelig(lnDONATIONS ~ lnPRICE + lnFUNDRAISING + lnAGE, model = "ls",
data = mydata)
x.out <- setx(z.out)
s.out <- sim(z.out, x = x.out)
summary(s.out)
plot(s.out)
This works fine, but I am trying to implement something that is allowed in the
Stata-based precursor to Zelig (_clarify_); specifically, in the _clarify_
package, after the 'setx' command, you can type in **simqi, tfunc(exp)** in
order to get the expected values based on the exponential transformation of the
dependent variable (the _simqi_ command in Stata is analogous to the _sim_
comamnd in R/Zelig). My question is, can this post-_setx_ exponential
transformation be done in R with the Zelig package, and if so, how? The very
extensive Zelig documentation does not seem to have an analogue to the 'tfunc'
command in the _clarify_ package.
Thanks in advance for any insights.
Best,
Greg
-
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,
Is it possible with zelig to run a survey weighted negative binomial regression?
Thanks for the help.
Best,
Evann
====================================
Evann Smith
Ph.D. Student
Harvard University, Department of Government
egsmith(a)fas.harvard.edu
====================================
-
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/
The answer should be yes, but I'm posting this to the zelig mailing list
just in case.
Kosuke
--
Department of Politics
Princeton University
http://imai.princeton.edu
On Wed, 9 Mar 2011, Brown, Jason wrote:
> Hello Dr. Imai,
>
>
>
> I'm attempting to estimate a bivariate logistic model of household labor
> participation decisions. I believe the zelig function will work.
> However, my data are from a complex survey design. I need to use full
> sample weights or replicate weights in a delete-a-group jackknife
> procedure for accurate inference. Can the zelig function take on a
> weight statement or a d-a-g object as in the "survey" package? The
> documentation is not clear on this point.
>
>
>
> Thank you for your time.
>
>
>
> Regards,
>
> Jason
>
>
>
> Jason P. Brown, Ph.D.
>
> Economist
>
> U.S. Department of Agriculture
>
> Economic Research Service
>
> jbrown(a)ers.usda.gov <mailto:jbrown@ers.usda.gov>
>
> phone: (202) 694-5625
>
>
>
>
>
>
-
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/
Hi,
I'm trying to use cem after Amelia. I'm getting sensible results, but also various error/warning messages. Any assistance/clarification about them would be appreciated. Below I'll describe the two scenarios in which I'm getting three different error/warning messages.
I realise this is a Zelig list, but I'm hoping that questions about Amelia and/or cem are answerable here--if not, please let me know.
Many thanks,
Malcolm
===============
FIRST, without using Amelia, in some instances when I call "att" (within cem package), I'm getting:
> mod <- att(mat, depvar ~ treated + as.factor(control1) + as.factor(control2), model="logit", data = dat)
Warning messages:
1: In eval(expr, envir, enclos) :
non-integer #successes in a binomial glm!
2: In predict.lm(object, newdata, se.fit, scale = 1, type = ifelse(type == :
prediction from a rank-deficient fit may be misleading
Comment: My outcome variable is definitely only zeros and ones, so the complaint that it contains something else is weird. From searching around on the web, my impression is that including weights in a binomial glm can generate this warning message. And my understanding is that cem uses weights when calling "att". So is this an apparently alarming but actually harmless glitch in att? I don't have any ideas about the second warning.
===============
SECOND, in other instances, after multiply imputing missing data with Amelia, and combining the five imputations into an object "impute", I'm getting:
> mod2 <- att(mat2, depvar2 ~ treated, data = imputed, model="logit")
> summary(mod2)
Treatment effect estimation for data:
NULL
Logistic model estimated on matched data only
Coefficients:
Error in symnum(pv, corr = FALSE, na = FALSE, cutpoints = c(0, 0.001, :
'x' must be between 0 and 1
Comment: I can get details about "mod2" by calling "str(mod2)", but that's obviously cumbersome and I'm curious why I can't use the usual "summary" function.
-
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/
Dear zelig-users,
I have a few questions regarding the use of plot.ci. And if somebody is proficient with the boolplot function (boolean) it would be great.
I am trying to produce two comparable graphs, showing the variation of the predicted propability of Y over the full range of one indipendent variable, including the confidence interval. Once using a boolean regression and once using a plain probit.
Since I have just started to use zelig, I am in a bit of trouble, trying to make that work.
Now the first question:
Is it possible to change the illustration of the confidence interval? I would need a connected line for the actual values and two lines indicating the confindence interval.
answer.zelig <- zelig(altruis2 ~ prosocial + ask1 + awelloff2 + rooms + neig + resis, data = rd, model = "probit")
summary(answer.zelig)
prorange <- seq(0,1,by=0.01)
x.1 <- setx(answer.zelig, prosocial=prorange)
s.out <- sim(answer.zelig, x = x.1)
plot.ci(s.out)
Or: Is it easier to change the shape of the CI in a boolplot?
My third question also deals with the boolplot function. If I set the implemented histogram to "false", the graph does not connect the values anymore. Does anyone have an idea if and how to change that?
answer.zelig <- zelig(bp, data = rd, model = "boolean", link = "probit", method = "BFGS")
boolplot(answer.zelig, CI=95, variable = "prosocial", truehist=F, plot.both = F, delta = 0, yscale=c(0, 1))
Thank you all in advance for any ideas.
Best regards,
Malte Reichelt
(University of Mannheim)
--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone
-
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/