I would like to use GAM to run penalized beta regression. Because of my setting, I also need to change the regression of precision, phi.
Here is my test code:
y <- c(0.0000943615,0.0074918919,0.0157332851,0.0783308615,
0.1546375803,0.5558444681,0.8583806898,0.9617216854,
0.9848004112,0.9964662546)
x <- log(c(0.05, 0.1, 0.15, 0.2, 0.4, 0.8, 1.6, 3.2, 4.5, 6.4))
fit.gam <- gam(y~x,family=betar(link="logit"))
I noticed that there is another argument theta in betar, but I don't know how to set it. Seems like theta requires me to enter a number.
The default link function for phi in GAM beta regression is log link. My questions are how to change the link function to be identity and how to add x as a regressor for phi.
Thanks!
bbmlepackage, butbbmlecan't do penalized regression, or at least not the fancy kinds of penalized regression thatmgcvdoes. I'm not aware offhand of an R package that can do this (penalized regression plus covariate-dependent, identity-link estimation of the dispersion). Can you change your example so that it is realistic in terms of the kind of penalized term you want to use for the fixed effects?