Many thanks Olivia for the quick response, and apologies for not making myself clearer.
I have worked through the whole 3 steps and simulated fitted values across the range of
the explanatory variable in my data. That worked fine. The problem is we have been asked
to supply equations by reviewers, so when we looked at the documentation where the
equations are provided, it was unclear which value for psi we should use because of the x3
variable in the equation. The inverse link part was no problem, rather it was the manual
calculation of joint probabilities that caused me to come unstuck. If we knew which part
of the model output gives x3 (assuming log(oratio) is given by exp((intercept):3)), then I
think that would solve our problem.
In no way would I want to (or be able to) reengineer the prediction process!
Thanks for any clarifications, and please excuse my lack of base knowledge about this kind
of model.
Dave
-----Original Message-----
From: monkeykupo(a)gmail.com [mailto:monkeykupo@gmail.com] On Behalf Of Olivia Lau
Sent: May-09-12 4:50 PM
To: David Auty
Cc: zelig(a)lists.gking.harvard.edu
Subject: Re: [zelig] Value for log(oratio) in "blogit" model
I would suggest that you run through the whole 3 steps: zelig, setx, and sim -- sim will
output the predicted probabilities so you can examine further, no need to re-engineer the
predicted probability process. :)
You can also use the predict() function in the VGAM library, which just takes the inverse
link function. To find the inverse link function, take the output from vglm (say vout)
and use:
vout@family@inverse
The inverse function takes the linear predictor (x %*% beta), but only works (well) in
predict because additional objects are not called with proper lexical scoping (and are
passed implicitly from the vout object itself). But if you want to learn how predicted
probabilities work, I would start here.
HTH.
Olivia
On Wed, May 9, 2012 at 1:27 PM, David Auty <auty.david.1(a)ulaval.ca> wrote:
Hi there,
I'm fitting a bivariate logistic (blogit) model using Zelig and would
like to use the equations given in the documentation to hard code some
predictions, and to understand further how the model works. The
problem is that while it is easy to calculate the marginal
probabilities, it is unclear from the documentation what value of psi
to use in the equations for the joint probabilities. The documentation gives:
Odds ratio (psi )= exp(x3*beta3)
But we don't know what to substitute for x3 in this equation. Using
exp((intercept):3) from the model does not give plausible answers,
which leads us to assume we are missing something obvious and important.
Have searched the archives and also the VGAM documentation with no
luck, so would be grateful for any pointers.
R2.15.0 on Windows 7.
Thanks in advance for any help.
Regards,
David Auty
Stagiaire Postdoctoral
Département des sciences du bois et de la forêt
Université Laval
Québec (QC) G1V 0A6
-
--
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
https://lists.gking.harvard.edu/mailman/listinfo/zelig