just use relogit within zelig, following the zelig rules and both stages
will be corrected, the first during estimation and the second during
simulation to calculate the quantities of interest. from that point you
can do whatever you like with those quantities, including out of sample
validation.
Gary
--
*Gary King* - Albert J. Weatherhead III University Professor - Director,
IQSS <http://iq.harvard.edu/>- Harvard University
GaryKing.org - King(a)Harvard.edu - @KingGary <https://twitter.com/kinggary> -
617-500-7570 - fax 812-8581 - Assistant <king-assist(a)iq.harvard.edu>du>:
495-9271
On Fri, Mar 28, 2014 at 5:49 AM, Hanne De Brue <Hanne.DeBrue(a)ees.kuleuven.be
wrote:
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
-
--
Zelig Mailing List, served by HUIT
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/mailman/listinfo/zelig
Zelig program information:
http://gking.harvard.edu/zelig/
Zelig mailing list
Zelig(a)lists.gking.harvard.edu
To unsubscribe from this list or get other information:
https://lists.gking.harvard.edu/mailman/listinfo/zelig