[R] betareg question - keeping the mean fixed?
Achim Zeileis
Achim.Zeileis at uibk.ac.at
Sun Sep 25 21:59:12 CEST 2011
On Mon, 5 Sep 2011, Achim Zeileis wrote:
> On Mon, 5 Sep 2011, Bettina Gruen wrote:
>
>> On 09/02/2011 07:20 PM, betty_d wrote:
>>> Thanks for your response, that does work, however, it is still not quite
>>> what
>>> want. I would like to tell betareg what the mean is (in my case, 0.5) and
>>> force it to use that value. Is this possible?
>>
>> AFAIK package betareg currently does not allow you to fix the mean and only
>> estimate the precision parameters.
>
> That is also my impression. When I wrote the code, I had in mind that
> there should be at least one parameter to estimate in each of the
> components (mean/precision). I'll have a look if that can be changed
> easily.
Now I finally got round to modify this. The development version of
"betareg" available from R-Forge at
https://R-Forge.R-project.org/R/?group_id=1220
now incorporates the possibility to fit models with y ~ 0 | z1 + z2
which should be what you wanted. It results in all observations having
mean mu = 0.5 and precision is phi = exp(g1 * z1 + g2 * z2).
Moreover, nonconstant precomputed means "mufit" could be incorporated as
y ~ offset(mufit) | z1 + z2 etc.
Best,
Z
More information about the R-help
mailing list