i'm not sure how exactly you're running the routine, but from what i can
see, s doesn't have to necessarily be negative from that equation if
(mu*(1-mu))/var(y) > 1. since you can't define var(y) without either s or
a, perhaps you're missing some constraint on s or a? remember that the
logit, although it constrains 0 < mu < 1, doesn't constrain either a or b to
be positive, which is what you need.
2009/3/26 Lee, Clarence <clee at hbs.edu>
Hi all,
I?m struggling with this problem and I am wondering if any of you could
help me out:
So my response variable y is in the open interval (0,1), and I want to
model a dataset using the Beta distribution. My question deals with how to
reparameterize the shape parameters a and b and link it to my covariates
(x?s) using a logit function.
The best thing I?ve come up with so far is:
1) Define a new parameter mu, such that logit(mu) = X %*%
coefficients
2) Define a new parameter s = a + b. We also know that var(y) =
(mu*(1-mu))/(1+s).
3) Through this, I can solve for a and b, this is my
reparamterization.
The problem I keep running into is that, by solving for s from the equation
var(y) = (mu*(1-mu))/(1+s), s turns out to be negative, since mu is always
less than 1 and var(y) is also less than 1. Since the beta distribution is
only defined for s>0, my optim routine just stops. Could someone who has
experience with this tell me what piece of insight am I missing? There must
be something I?m missing since my s values are all negative.
Thanks a bunch!
Clarence
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
--
Patrick Lam
Department of Government and Institute for Quantitative Social Science,
Harvard University
http://www.people.fas.harvard.edu/~plam