Hi,
I have a dataset with proportions that vary around a fixed mean, is it
possible to use betareg to look at variance in the dispersion parameter
while keeping the mean fixed?
I am very new to R but have tried the following:
svec<-c(qlogis(mean(data1$scaled)),0,0,0)
f<-betareg(scaled~-1 | expt_label + grouped_hpi, data=data1, link.phi="log",
control=betareg.control(start=svec))
I understood that y~-1 could be used to give a fixed mean of 0.5 however I
get the following error:
Error in linkinv(x %*% beta + offset) :
Argument eta must be a nonempty numeric vector
If you want to have a fixed mean, i.e., only fit an intercept, you need to
specify it using
y ~ 1 | exp_label + grouped_hpi.
Including -1 in the formula on the right hand side makes only sense if you
have other covariates included and explicitly want to exclude the intercept.
HTH,
Bettina
--
-------------------------------------------------------------------
Bettina Grün
Institut für Angewandte Statistik / IFAS
Johannes Kepler Universität Linz
Altenbergerstraße 69
4040 Linz, Austria
Tel: +43 732 2468-5889
Fax: +43 732 2468-9846
E-Mail:bettina.gr...@jku.at
www.ifas.jku.at
-------------------------------------------------------------------
--
-------------------------------------------------------------------
Bettina Grün
Institut für Angewandte Statistik / IFAS
Johannes Kepler Universität Linz
Altenbergerstraße 69
4040 Linz, Austria
Tel: +43 732 2468-5889
Fax: +43 732 2468-9846
E-Mail: bettina.gr...@jku.at
www.ifas.jku.at
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.