Hi Clarence,
I was just thinking about something like this for another project. I have been taking mu
= a/(a+b) as the mean of the beta and s = (a+b) as the dispersion. Since mu needs to be
between 0 and 1, I can reparameterize that with logit, and since s needs to be positive, I
could reparameterize that with an log.
BUT, my model has had some trouble fitting reasonable values for s with this
parameterization, so I've also been reparameterizing s to ensure that it is bounded
away from zero, for example s' is the unrestricted reparameterization and s =
1+exp(s'). This seems to help prevent the optimization from getting stuck at some
undesirable local maximum.
--Abie
________________________________________
From: gov2001-l-bounces at
lists.fas.harvard.edu [gov2001-l-bounces at
lists.fas.harvard.edu] On Behalf Of Patrick Lam [plam at
fas.harvard.edu]
Sent: Wednesday, March 25, 2009 11:33 PM
To: gov2001-l at
lists.fas.harvard.edu
Subject: Re: [gov2001-l] Beta Distribution Reparameterization
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<mailto: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<mailto: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