Megan B. | 15 Apr 05:11 2014

"In mer_finalize(ans) : singular convergence (7)" error in fitting a mixed gamma model

Hi everyone, 

I have a dataset of plant drought tolerance values, and my 
original goal was to partition variance in 
these values among the nested random levels Biome/Study site. 
However, my drought tolerance data is significantly non-normal, 
and is best-fit by a gamma distribution, according to the R 
package fitdistr. Since lme4 doesn't seem to be able to work 
with gamma distributions (I got the 
same error as described in this thread:
 https://stat.ethz.ch/pipermail/r-sig-mixed-
models/2010q2/003786.html), 
I wanted to use zelig to determine which level accounts for the 
greatest variance in this trait. 

I tried specifying the following model:

zelig(V37 ~ tag(1|Biomes/Site_Numbers), data = Seasonal_sites, 
model = "gamma.mixed") -> mod1

But I get the following error message: 
"In mer_finalize(ans) : singular convergence (7)"

And my estimated variances go to infinity:

 0:     54.614133: 0.263523  2.62573
  1:    -1594.5787:  0.00000  18.5619
  2:    -1917.2900:  0.00000  25.9591
  3:    -2469.0981: 0.0137130  45.6228
  4:    -2936.0296:  0.00000  73.0933
(Continue reading)

Hanne De Brue | 28 Mar 10:49 2014
Picon

Zelig relogit

Dear sir,

 

For my doctoral research I apply rare events logistic regression from the Zelig package in R to a data set of Roman archaeological sites within Belgium. I wish to calculate some measure to validate the model, such as ROC and percent correctly predicted for varying probability cut-off values. For that, I would also like to calculate the probabilities of the event occurring for both a calibration and a validation data set. However, I am not sure how to tackle this part. I understood from your work that, besides a prior (case-control) correction of the intercept and corrections for biased coefficients, the probability itself also needs to be corrected. The general equation probability = 1 / (1 + exp(-xB)) is hence not sufficient.

 

I am struggling to figure out how Zelig can calculate this adjusted probability. I noticed that R functions such as predict() and fitted() use the general equation, which implies an underestimation. I thought that I might use setx() and sim(), however I am not sure how to apply them to all observations of my data sets (and not only e.g. a mean of all observations), nor can I find the resulting probability value(s). Defining values of one observation in setx() and calling the sim() summary indicates that a value of 1 is used for the intercept (?) and that the probability (E(Y|X)) equals 0.001 (as it does for any other combination of x.out values – maybe because of rounding to three decimals?). Calling s.out$qi$ev returns ‘NULL’.

 

I would greatly appreciate any help on this issue.

Thank you very much in advance.

 

Kind regards

Hanne

 

Hanne De Brue

KU Leuven

Division of Geography

Department of Earth and Environmental Sciences

Celestijnenlaan 200E, box 2409, B-3001 Leuven

T +32 16 329763

E hanne.debrue[at]ees.kuleuven.be

 

<div>
<div class="WordSection1">
<p class="MsoNormal">Dear sir,<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><span lang="EN-US">For my doctoral research I apply rare events logistic regression from the Zelig package in R to a data set of Roman archaeological sites within Belgium. I wish to calculate some measure to validate the model, such as
 ROC and percent correctly predicted for varying probability cut-off values. For that, I would also like to calculate the probabilities of the event occurring for both a calibration and a validation data set. However, I am not sure how to tackle this part.
 I understood from your work that, besides a prior (case-control) correction of the intercept and corrections for biased coefficients, the probability itself also needs to be corrected. The general equation probability = 1 / (1 + exp(-xB)) is hence not sufficient.
<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">I am struggling to figure out how Zelig can calculate this adjusted probability. I noticed that R functions such as predict() and fitted() use the general equation, which implies an underestimation. I thought that I might
 use setx() and sim(), however I am not sure how to apply them to all observations of my data sets (and not only e.g. a mean of all observations), nor can I find the resulting probability value(s). Defining values of one observation in setx() and calling the
 sim() summary indicates that a value of 1 is used for the intercept (?) and that the probability (E(Y|X)) equals 0.001 (as it does for any other combination of x.out values &ndash; maybe because of rounding to three decimals?). Calling s.out$qi$ev returns &lsquo;NULL&rsquo;.<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">I would greatly appreciate any help on this issue.
<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thank you very much in advance.<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">Kind regards<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">Hanne<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">Hanne De Brue<p></p></span></p>
<p class="MsoNormal"><span lang="EN-GB">KU Leuven</span><span lang="EN-GB"><p></p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Division of Geography</span><span lang="EN-GB"><p></p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Department of Earth and Environmental Sciences<p></p></span></p>
<p class="MsoNormal"><span>Celestijnenlaan 200E, box 2409, B-3001 Leuven</span><span><p></p></span></p>
<p class="MsoNormal"><span>T +32 16 329763</span><span><p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">E hanne.debrue[at]ees.kuleuven.be<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
</div>
</div>
Meredith, Christy S -FS | 27 Mar 21:54 2014
Picon

help with obtaining fitted values?

Hello I am having trouble finding the fitted values from Zelig. I ultimately want to use my models to predict on a new dataset and then be able to extract the fitted values to determine how well my model performs. I have tried varies methods in the documentation, but nothing works for me.  I appreciate any help.

 

Thanks!

 

Christy Meredith

 

My code:

 

z.out=zelig(beavpres~Grad+Elev + distancew+Elev + GrazingR+AvgPrecip+deciduous+Bf+AvgVWidth*Grad,data=update5a,model="relogit",tau=0.05)

 

cv.out=cv.glm(z.out,data=update5a) # try cross validation

 

x.out <- setx(z.out)

s.out <- sim(z.out,x.out)

 

 

#attempt to determine fitted values- doesn’t work

s.out$qi$ev

z.out$fitted.values

 

 

Christy Meredith

USDA Forest Service

Rocky Mountain Research Station

PIBO Monitoring

Data Analyst

Voice: 435-755-3573

Fax: 435-755-3563

 





This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.
<div>
<div class="WordSection1">
<p class="MsoNormal">Hello I am having trouble finding the fitted values from Zelig. I ultimately want to use my models to predict on a new dataset and then be able to extract the fitted values to determine how well my model performs. I have tried varies methods
 in the documentation, but nothing works for me. &nbsp;I appreciate any help. <p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Thanks!<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Christy Meredith<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">My code:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">z.out=zelig(beavpres~Grad+Elev + distancew+Elev + GrazingR+AvgPrecip+deciduous+Bf+AvgVWidth*Grad,data=update5a,model="relogit",tau=0.05)<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">cv.out=cv.glm(z.out,data=update5a) # try cross validation<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">x.out &lt;- setx(z.out)<p></p></p>
<p class="MsoNormal">s.out &lt;- sim(z.out,x.out)<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">#attempt to determine fitted values- doesn&rsquo;t work<p></p></p>
<p class="MsoNormal">s.out$qi$ev<p></p></p>
<p class="MsoNormal">z.out$fitted.values<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Christy Meredith<p></p></p>
<p class="MsoNormal">USDA Forest Service<p></p></p>
<p class="MsoNormal">Rocky Mountain Research Station<p></p></p>
<p class="MsoNormal">PIBO Monitoring<p></p></p>
<p class="MsoNormal">Data Analyst<p></p></p>
<p class="MsoNormal">Voice: 435-755-3573<p></p></p>
<p class="MsoNormal">Fax: 435-755-3563<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
</div>
<br><br><br><br>
This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil
 or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.
</div>
Hanne De Brue | 1 Apr 10:40 2014
Picon

Relogit output

Dear Zelig users,

I have been struggling for a while now to perform a rare events logistic
regression procedure. I have come to the point where my R code runs
smoothly, however I experience trouble interpreting the Zelig output. A few
issues I hope someone can help me with:

- Some categorical (factor) variables and intercepts that are not
significant in an ordinary logit model, receive in the relogit procedure
Pr(>|z|) values of 0.000e+00.

- The case control prior correction for the intercept is based on tau, the
ratio between positive and negative events (e.g. King and Zeng, 2001, Eq.
7). However, changing tau affects all coefficients except the intercept. 

- Based on e.g. King and Zeng (2001), I understand that after prior and bias
correction, probabilities calculated according to general equation Pr(Y=1|B)
=  1/(1 + exp(xB)) lead to underestimation and still need to be corrected
for uncertainties, as described in Eq. 15-16 of King and Zeng (2001). It is
not clear however, how (or if) Zelig relogit deals with this correction.
Fitted() or predict() obviously do not apply this correction.

Any help would be appreciated - I have been trying to figure this out for
more than a week now. Please note that I am not subscribed to the mailing
list. I am not sure if answers appear on gmane.comp.lang.r.zelig, if not:
comments can be sent to hanne.debrue@...

Many thanks!!

Hanne

Jennifer Boylan | 7 Mar 21:45 2014
Picon

Zelig- ei.RxC

Hello,

I am having trouble running an ei.RxC model through Zelig. At first I got the error that has been discussed in previous posts (i.e. November 2012) where R replied that ei.RxC wasn't an available model:

** The model "ei.RxC" is not available with the currently loaded packages, ** and is not an official Zelig package. ** The model's name may be a typo.
So, following Matt Owen's November 2012 post, I upgraded to R version 3.0.2 and rolled back Zelig 4.0 to Zelig 3.5. Now, however, I get an error--> Error: could not find function "zelig"A February 2007 post recommended that the user switch from library(zelig) to library(Zelig), but that is not the problem in my case. But when I do run library(Zelig) I get a response that: Error : .onAttach failed in attachNamespace() for 'Zelig', details: call: NULL error: '.readRDS' is defunct. Use 'readRDS' instead. See help("Defunct") Error: package or namespace load failed for ‘Zelig’

Any idea about what is going on here? Did my installation of Zelig 3.5 work? I'm pasting the full documentation below. It shows that I first removed Zelig, installed the 3.5 version, (unsuccessfully) tried to open library(Zelig), and (unsuccessfully) tried to run the model. 

Much Thanks,
Jennifer Boylan



> remove.packages("Zelig")
Removing package from ‘C:/Users/Jenny/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
> install.packages("Zelig", repos = "http://r.iq.harvard.edu/archived", type = "source")
Installing package into ‘C:/Users/Jenny/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
Content type 'application/x-gzip' length 5711031 bytes (5.4 Mb)
opened URL
downloaded 5.4 Mb

* installing *source* package 'Zelig' ...
files 'inst/doc/figs/icon_minus.gif', 'inst/doc/figs/icon_plus.gif', 'inst/doc/figs/increase.eps', 'inst/doc/figs/increase.pdf', 'inst/doc/figs/roc.eps', 'inst/doc/figs/roc.pdf', 'inst/doc/figs/sample1.eps', 'inst/doc/figs/sample1.pdf', 'inst/doc/figs/sample2.eps', 'inst/doc/figs/sample2.pdf', 'inst/doc/figs/ternary.eps', 'inst/doc/figs/ternary.pdf', 'inst/doc/figs/vertci.eps', 'inst/doc/figs/vertci.pdf' are missing
files 'DESCRIPTION', 'R/zelig2probit.R', 'inst/doc/blogit.pdf', 'inst/doc/bprobit.pdf', 'inst/doc/gamma.mixed.pdf', 'inst/doc/gamma.pdf', 'inst/doc/gamma.survey.pdf', 'inst/doc/logit.mixed.pdf', 'inst/doc/logit.pdf', 'inst/doc/logit.survey.pdf', 'inst/doc/ls.mixed.pdf', 'inst/doc/ls.pdf', 'inst/doc/negbin.pdf', 'inst/doc/normal.survey.pdf', 'inst/doc/poisson.mixed.pdf', 'inst/doc/poisson.pdf', 'inst/doc/poisson.survey.pdf', 'inst/doc/probit.mixed.pdf', 'inst/doc/probit.pdf', 'inst/doc/probit.survey.pdf', 'inst/doc/vigpics/blogit-BasicExamplePlot.pdf', 'inst/doc/vigpics/blogit-JointExamplePlot.pdf', 'inst/doc/vigpics/bprobit-BasicExamplePlot.pdf', 'inst/doc/vigpics/bprobit-JointEstimationPlot.pdf', 'inst/doc/vigpics/gamma-ExamplePlot.pdf', 'inst/doc/vigpics/gammasurvey-ExistingPlot.pdf', 'inst/doc/vigpics/gammasurvey-ReplicatePlot.pdf', 'inst/doc/vigpics/lmmixed-ExamplesPlot.pdf', 'inst/doc/vigpics/logit-ExamplePlot.pdf', 'inst/doc/vigpics/logit-FirstDifferencesPlot.pdf', 'inst/doc/vigpics/logit-ROCPlot.pdf', 'inst/doc/vigpics/logitsurvey-ExistingPlot.pdf', 'inst/doc/vigpics/logitsurvey-ReplicatePlot.pdf', 'inst/doc/vigpics/ls-DummyPlot.pdf', 'inst/doc/vigpics/ls-Example4Plot.pdf', 'inst/doc/vigpics/ls-ExamplesPlot.pdf', 'inst/doc/vigpics/negbin-Example1Plot.pdf', 'inst/doc/vigpics/normal-ExistingPlot.pdf', 'inst/doc/vigpics/normal-ReplicatePlot.pdf', 'inst/doc/vigpics/poisson-ExamplePlot.pdf', 'inst/doc/vigpics/poissonsurvey-ExistingPlot.pdf', 'inst/doc/vigpics/poissonsurvey-ReplicatePlot.pdf', 'inst/doc/vigpics/probitsurvey-ExistingPlot.pdf', 'inst/doc/vigpics/probitsurvey-ReplicatePlot.pdf', 'inst/doc/vigpics/weibull-ExamplePlot.pdf', 'inst/doc/weibull.pdf', 'man/Zelig-package.Rd' have the wrong MD5 checksums
** R
** data
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
   'blogit.Rnw' 
   'bprobit.Rnw' 
   'gamma.Rnw' 
   'gamma.mixed.Rnw' 
   'gamma.survey.Rnw' 
   'logit.Rnw' 
   'logit.mixed.Rnw' 
   'logit.survey.Rnw' 
   'ls.Rnw' 
   'ls.mixed.Rnw' 
   'negbin.Rnw' 
   'normal.survey.Rnw' 
   'poisson.Rnw' 
   'poisson.mixed.Rnw' 
   'poisson.survey.Rnw' 
   'probit.Rnw' 
   'probit.mixed.Rnw' 
   'probit.survey.Rnw' 
   'weibull.Rnw' 
** testing if installed package can be loaded
## 
##  Zelig (Version 3.5.4, built: 2010-01-20)
##  Please refer to http://gking.harvard.edu/zelig for full
##  documentation or help.zelig() for help with commands and
##  models supported by Zelig.
##

##  Zelig project citations:
##    Kosuke Imai, Gary King, and Olivia Lau. (2009).
##    ``Zelig: Everyone's Statistical Software,''
##  and
##    Kosuke Imai, Gary King, and Olivia Lau. (2008).
##    ``Toward A Common Framework for Statistical Analysis
##    and Development,'' Journal of Computational and
##    Graphical Statistics, Vol. 17, No. 4 (December)
##    pp. 892-913. 

##  To cite individual Zelig models, please use the citation format printed with
##  each model run and in the documentation.
##
* DONE (Zelig)

The downloaded source packages are in
        ‘C:\Users\Jenny\AppData\Local\Temp\RtmpCMxAyF\downloaded_packages’
> library(Zelig)
## 
##  Zelig (Version 3.5.4, built: 2010-01-20)
##  Please refer to http://gking.harvard.edu/zelig for full
##  documentation or help.zelig() for help with commands and
##  models supported by Zelig.
##

##  Zelig project citations:
##    Kosuke Imai, Gary King, and Olivia Lau. (2009).
##    ``Zelig: Everyone's Statistical Software,''
##  and
##    Kosuke Imai, Gary King, and Olivia Lau. (2008).
##    ``Toward A Common Framework for Statistical Analysis
##    and Development,'' Journal of Computational and
##    Graphical Statistics, Vol. 17, No. 4 (December)
##    pp. 892-913. 

##  To cite individual Zelig models, please use the citation format printed with
##  each model run and in the documentation.
##
Error : .onAttach failed in attachNamespace() for 'Zelig', details:
  call: NULL
  error: '.readRDS' is defunct.
Use 'readRDS' instead.
See help("Defunct")
Error: package or namespace load failed for ‘Zelig’
> STATA <- read.dta("C:/R/aggvote2.dta", convert.factors = FALSE)
> z.out <- zelig(cbind(ndc, npp, thirdparty, reject, novote12) ~ allakan + allga + allewe + allguan + allgurma + allmole + allgrusi + allmande + allothers + allmissing, model = "ei.RxC", data=STATA)
Error: could not find function "zelig"


--
PhD Candidate
Department of Political Science
University of Florida
PO Box 117325
Gainesville, FL 32611-7325
<div><div dir="ltr">Hello,<div><br></div>
<div>I am having trouble running an ei.RxC model through Zelig. At first I got the error that has been discussed in previous posts (i.e. November 2012) where R replied that ei.RxC wasn't an available model:</div>

<div><br></div>
<div>** The model "ei.RxC" is not available with the currently loaded packages,
** and is not an official Zelig package.
** The model's name may be a typo.<br>So, following Matt Owen's November 2012 post, I upgraded to R version 3.0.2 and rolled back Zelig 4.0 to Zelig 3.5.

Now, however, I get an error--&gt; Error: could not find function "zelig"A February 2007 post recommended that the user switch from library(zelig) to library(Zelig), but that is not the problem in my case. 

But when I do run library(Zelig) I get a response that:&nbsp;Error : .onAttach failed in attachNamespace() for 'Zelig', details:
  call: NULL
  error: '.readRDS' is defunct.
Use 'readRDS' instead.
See help("Defunct")
Error: package or namespace load failed for &lsquo;Zelig&rsquo;<div><br></div>
<div>Any idea about what is going on here? Did my installation of Zelig 3.5 work? I'm pasting the full documentation below. It shows that I first removed Zelig, installed the 3.5 version, (unsuccessfully) tried to open library(Zelig), and (unsuccessfully) tried to run the model.&nbsp;</div>

<div><br></div>
<div>Much Thanks,</div>
<div>Jennifer Boylan</div>
<div><br></div>
<div><br></div>
<div><br></div>
<div>
<div>&gt; remove.packages("Zelig")</div>
<div>Removing package from &lsquo;C:/Users/Jenny/Documents/R/win-library/3.0&rsquo;</div>

<div>(as &lsquo;lib&rsquo; is unspecified)</div>
<div>&gt; install.packages("Zelig", repos = "<a href="http://r.iq.harvard.edu/archived">http://r.iq.harvard.edu/archived</a>", type = "source")</div>
<div>
Installing package into &lsquo;C:/Users/Jenny/Documents/R/win-library/3.0&rsquo;</div>
<div>(as &lsquo;lib&rsquo; is unspecified)</div>
<div>trying URL '<a href="http://r.iq.harvard.edu/archived/src/contrib/Zelig_3.5.4.tar.gz">http://r.iq.harvard.edu/archived/src/contrib/Zelig_3.5.4.tar.gz</a>'</div>
<div>Content type 'application/x-gzip' length 5711031 bytes (5.4 Mb)</div>

<div>opened URL</div>
<div>downloaded 5.4 Mb</div>
<div><br></div>
<div>* installing *source* package 'Zelig' ...</div>
<div>files 'inst/doc/figs/icon_minus.gif', 'inst/doc/figs/icon_plus.gif', 'inst/doc/figs/increase.eps', 'inst/doc/figs/increase.pdf', 'inst/doc/figs/roc.eps', 'inst/doc/figs/roc.pdf', 'inst/doc/figs/sample1.eps', 'inst/doc/figs/sample1.pdf', 'inst/doc/figs/sample2.eps', 'inst/doc/figs/sample2.pdf', 'inst/doc/figs/ternary.eps', 'inst/doc/figs/ternary.pdf', 'inst/doc/figs/vertci.eps', 'inst/doc/figs/vertci.pdf' are missing</div>

<div>files 'DESCRIPTION', 'R/zelig2probit.R', 'inst/doc/blogit.pdf', 'inst/doc/bprobit.pdf', 'inst/doc/gamma.mixed.pdf', 'inst/doc/gamma.pdf', 'inst/doc/gamma.survey.pdf', 'inst/doc/logit.mixed.pdf', 'inst/doc/logit.pdf', 'inst/doc/logit.survey.pdf', 'inst/doc/ls.mixed.pdf', 'inst/doc/ls.pdf', 'inst/doc/negbin.pdf', 'inst/doc/normal.survey.pdf', 'inst/doc/poisson.mixed.pdf', 'inst/doc/poisson.pdf', 'inst/doc/poisson.survey.pdf', 'inst/doc/probit.mixed.pdf', 'inst/doc/probit.pdf', 'inst/doc/probit.survey.pdf', 'inst/doc/vigpics/blogit-BasicExamplePlot.pdf', 'inst/doc/vigpics/blogit-JointExamplePlot.pdf', 'inst/doc/vigpics/bprobit-BasicExamplePlot.pdf', 'inst/doc/vigpics/bprobit-JointEstimationPlot.pdf', 'inst/doc/vigpics/gamma-ExamplePlot.pdf', 'inst/doc/vigpics/gammasurvey-ExistingPlot.pdf', 'inst/doc/vigpics/gammasurvey-ReplicatePlot.pdf', 'inst/doc/vigpics/lmmixed-ExamplesPlot.pdf', 'inst/doc/vigpics/logit-ExamplePlot.pdf', 'inst/doc/vigpics/logit-FirstDifferencesPlot.pdf', 'inst/doc/vigpics/logit-ROCPlot.pdf', 'inst/doc/vigpics/logitsurvey-ExistingPlot.pdf', 'inst/doc/vigpics/logitsurvey-ReplicatePlot.pdf', 'inst/doc/vigpics/ls-DummyPlot.pdf', 'inst/doc/vigpics/ls-Example4Plot.pdf', 'inst/doc/vigpics/ls-ExamplesPlot.pdf', 'inst/doc/vigpics/negbin-Example1Plot.pdf', 'inst/doc/vigpics/normal-ExistingPlot.pdf', 'inst/doc/vigpics/normal-ReplicatePlot.pdf', 'inst/doc/vigpics/poisson-ExamplePlot.pdf', 'inst/doc/vigpics/poissonsurvey-ExistingPlot.pdf', 'inst/doc/vigpics/poissonsurvey-ReplicatePlot.pdf', 'inst/doc/vigpics/probitsurvey-ExistingPlot.pdf', 'inst/doc/vigpics/probitsurvey-ReplicatePlot.pdf', 'inst/doc/vigpics/weibull-ExamplePlot.pdf', 'inst/doc/weibull.pdf', 'man/Zelig-package.Rd' have the wrong MD5 checksums</div>

<div>** R</div>
<div>** data</div>
<div>** demo</div>
<div>** inst</div>
<div>** preparing package for lazy loading</div>
<div>** help</div>
<div>*** installing help indices</div>
<div>** building package indices</div>
<div>** installing vignettes</div>

<div>&nbsp; &nbsp;'blogit.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'bprobit.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'gamma.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'gamma.mixed.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'gamma.survey.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'logit.Rnw'&nbsp;</div>
<div>
&nbsp; &nbsp;'logit.mixed.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'logit.survey.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'ls.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'ls.mixed.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'negbin.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'normal.survey.Rnw'&nbsp;</div>

<div>&nbsp; &nbsp;'poisson.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'poisson.mixed.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'poisson.survey.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'probit.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'probit.mixed.Rnw'&nbsp;</div>
<div>&nbsp; &nbsp;'probit.survey.Rnw'&nbsp;</div>

<div>&nbsp; &nbsp;'weibull.Rnw'&nbsp;</div>
<div>** testing if installed package can be loaded</div>
<div>##&nbsp;</div>
<div>## &nbsp;Zelig (Version 3.5.4, built: 2010-01-20)</div>
<div>## &nbsp;Please refer to <a href="http://gking.harvard.edu/zelig">http://gking.harvard.edu/zelig</a> for full</div>

<div>## &nbsp;documentation or help.zelig() for help with commands and</div>
<div>## &nbsp;models supported by Zelig.</div>
<div>##</div>
<div><br></div>
<div>## &nbsp;Zelig project citations:</div>
<div>## &nbsp; &nbsp;Kosuke Imai, Gary King, and Olivia Lau. (2009).</div>

<div>## &nbsp; &nbsp;``Zelig: Everyone's Statistical Software,''</div>
<div>## &nbsp; &nbsp;<a href="http://gking.harvard.edu/zelig">http://gking.harvard.edu/zelig</a>.</div>
<div>## &nbsp;and</div>
<div>## &nbsp; &nbsp;Kosuke Imai, Gary King, and Olivia Lau. (2008).</div>

<div>## &nbsp; &nbsp;``Toward A Common Framework for Statistical Analysis</div>
<div>## &nbsp; &nbsp;and Development,'' Journal of Computational and</div>
<div>## &nbsp; &nbsp;Graphical Statistics, Vol. 17, No. 4 (December)</div>
<div>## &nbsp; &nbsp;pp. 892-913.&nbsp;</div>

<div><br></div>
<div>## &nbsp;To cite individual Zelig models, please use the citation format printed with</div>
<div>## &nbsp;each model run and in the documentation.</div>
<div>##</div>
<div>* DONE (Zelig)</div>
<div><br></div>
<div>The downloaded source packages are in</div>

<div>&nbsp; &nbsp; &nbsp; &nbsp; &lsquo;C:\Users\Jenny\AppData\Local\Temp\RtmpCMxAyF\downloaded_packages&rsquo;</div>
<div>&gt; library(Zelig)</div>
<div>##&nbsp;</div>
<div>## &nbsp;Zelig (Version 3.5.4, built: 2010-01-20)</div>
<div>## &nbsp;Please refer to <a href="http://gking.harvard.edu/zelig">http://gking.harvard.edu/zelig</a> for full</div>

<div>## &nbsp;documentation or help.zelig() for help with commands and</div>
<div>## &nbsp;models supported by Zelig.</div>
<div>##</div>
<div><br></div>
<div>## &nbsp;Zelig project citations:</div>
<div>## &nbsp; &nbsp;Kosuke Imai, Gary King, and Olivia Lau. (2009).</div>

<div>## &nbsp; &nbsp;``Zelig: Everyone's Statistical Software,''</div>
<div>## &nbsp; &nbsp;<a href="http://gking.harvard.edu/zelig">http://gking.harvard.edu/zelig</a>.</div>
<div>## &nbsp;and</div>
<div>## &nbsp; &nbsp;Kosuke Imai, Gary King, and Olivia Lau. (2008).</div>

<div>## &nbsp; &nbsp;``Toward A Common Framework for Statistical Analysis</div>
<div>## &nbsp; &nbsp;and Development,'' Journal of Computational and</div>
<div>## &nbsp; &nbsp;Graphical Statistics, Vol. 17, No. 4 (December)</div>
<div>## &nbsp; &nbsp;pp. 892-913.&nbsp;</div>

<div><br></div>
<div>## &nbsp;To cite individual Zelig models, please use the citation format printed with</div>
<div>## &nbsp;each model run and in the documentation.</div>
<div>##</div>
<div>Error : .onAttach failed in attachNamespace() for 'Zelig', details:</div>

<div>&nbsp; call: NULL</div>
<div>&nbsp; error: '.readRDS' is defunct.</div>
<div>Use 'readRDS' instead.</div>
<div>See help("Defunct")</div>
<div>Error: package or namespace load failed for &lsquo;Zelig&rsquo;</div>
<div>

&gt; STATA &lt;- read.dta("C:/R/aggvote2.dta", convert.factors = FALSE)</div>
<div>&gt; z.out &lt;- zelig(cbind(ndc, npp, thirdparty, reject, novote12) ~ allakan + allga + allewe + allguan + allgurma + allmole + allgrusi + allmande + allothers + allmissing, model = "ei.RxC", data=STATA)</div>

<div>Error: could not find function "zelig"</div>
<div>&gt;&nbsp;</div>
</div>
<div><br></div>
<div><br></div>-- <br>PhD Candidate<br>Department of Political Science<br>University of Florida<br>PO Box 117325<br>Gainesville, FL 32611-7325
</div>
</div></div>
Krzysztof Czauderna | 6 Mar 19:51 2014
Picon

BLOGIT, error after SIM()

Dear Subscribers,

On the basis of syntax from the ZeligChoice Manual I wanted to receive s.out results after BLOGIT (e.g.
qi$ev, qi$fd). However, after sim() command I get information about non-conformable arguments. Could
you interpret the message? Is it a problem with matrix dimensions?

Actually, I wanted to compare results of BIPROBIT computed in Stata with BLOGIT (bivariate logit is not
available in Stata). Unfortunately, I do not use R often enough :(

Regards,
Thank you in advance

library(ZeligChoice)
data<-read.csv("data.csv", header=TRUE, sep=";")
z.out2<-zelig(list(mu1=y1~age+gender+company+educ_4+educ_3+educ_2+qual_3+qual_2+qual_1,mu2=y2~age+gender+educ_4+educ_3+educ_2),model="blogit",data=data)
x.hi <- setx(z.out2, gender = 1)
x.lo <- setx(z.out2, gender = 0)

s.out2 <- sim(z.out2, x = x.lo, x1 = x.hi)
AFTER THIS COMMAND I GET AN EROR:
Error in all.coef[[1]] %*% as.matrix(xm[[1]]) : non-conformable arguments

Marwan Khawaja | 25 Feb 16:55 2014
Picon

error in Zelig

> Hello,
> I am trying to estimate average treatment effect in the Zelig  package
> (current R version on Windows), and ran the model exactly as in the
> documentation page 18 of the MatchIt package, and got the following error massage,
>
> ate.all<-c(s.out61$qi$att.ev, -s.out62$qi$att.ev)Error in
> -s.out62$qi$att.ev : invalid argument to unary operator
>
> (s.out62 is similar to s.out2 in the example0
>
> Appreciate your help.
Kindly respond to my private email - am not a
> subscriber to list at the moment.
>
> Thanks Marwan Khawaja
>
Marwan Khawaja | 28 Feb 09:19 2014
Picon

ATE

Hi,
I'd like to know when this feature will be back,

"Average Treatment Effect" quantities of interest are not being included in
  zelig models temporarily. Simulation of these qi's will return pending a
  minor update to the 'setx' function.
kindly respond to private email - not on the list

thanks marwan
--------------------------------------------------
Marwan Khawaja, Ph.D.
Chief, Demographic and Social Statistics Section
Statistics Division
UN-ESCWA
P.O. Box 11-8575
Riad el-Solh 1107 2270
Beirut,  Lebanon

Email: khawaja-HjGq50CcMvQ@public.gmane.org
Tel.: (+961-1) 978365 (direct)
Fax: (+961-1) 981510
_____________________________
<div>Hi,
<br>I'd like to know when this feature will
be back,
<br><br>"Average Treatment Effect" quantities of
interest are not being included in 
<br>&nbsp;&nbsp;zelig models temporarily. Simulation of
these qi's will return pending a 
<br>&nbsp;&nbsp;minor update to the 'setx' function.
<br>kindly respond to private email - not
on the list
<br><br>thanks marwan
<br>--------------------------------------------------
<br>Marwan Khawaja, Ph.D.<br>
Chief, Demographic and Social Statistics Section
<br>Statistics Division<br>
UN-ESCWA<br>
P.O. Box 11-8575<br>
Riad el-Solh 1107 2270<br>
Beirut, &nbsp;Lebanon<br><br>
Email: khawaja@...<br>
Tel.: (+961-1) 978365 (direct)<br>
Fax: (+961-1) 981510<br>
_____________________________<br>
</div>
M B | 25 Feb 19:43 2014
Picon

question

I wonder if someone could provide an explanation of the meaning of


"under the assumption that everything stays the same except that the treatment indicator is switched to ti = 0"
<div><div dir="ltr">
<span>I wonder if someone could provide an explanation of the meaning of</span><br><br><br><span>"under the assumption that everything stays the same except that the treatment indicator is switched to ti = 0"</span><br>
</div></div>
Nils B. Weidmann | 21 Jan 17:34 2014
Picon

Fitted values from a logit.gee Zelig model

I’m trying to extract fitted values from a logit.gee model (m1), using

m1$fitted.values

However, this returns NULL (as does m1$coefficients and the other fields listed on p. 265 of the Zelig
documentation). I know I can simply run a glm as a workaround, but nevertheless wanted to report this
issue. 

Best
Nils

--
Nils B. Weidmann
Professor of Political Science
University of Konstanz
http://cnc.uni.kn

Attachment (smime.p7s): application/pkcs7-signature, 6124 bytes
I’m trying to extract fitted values from a logit.gee model (m1), using

m1$fitted.values

However, this returns NULL (as does m1$coefficients and the other fields listed on p. 265 of the Zelig
documentation). I know I can simply run a glm as a workaround, but nevertheless wanted to report this
issue. 

Best
Nils

--
Nils B. Weidmann
Professor of Political Science
University of Konstanz
http://cnc.uni.kn

Swaroop | 22 Jan 19:10 2014
Picon

Zelig-GEE-error

Hi,

Trying to fit a GEE model using Zelig. Installed Zelig as follows:

install.packages("ZeligChoice", repos="http://r.iq.harvard.edu", type="source")

Receiving the following error message for GEE model as shown 
on page 269 here - http://r.iq.harvard.edu/docs/zelig.pdf

Error in UseMethod("multi.dataset") : no applicable method for
 'multi.dataset' applied to an object of class "name"

Is there a known reason for this error message?
What can I do to address it?

Thanks!


Gmane