0

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!

3
  • I'm guessing this isn't possible. I can show you how to fit the particular model you've got here with the bbmle package, but bbmle can't do penalized regression, or at least not the fancy kinds of penalized regression that mgcv does. 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? Commented Oct 28, 2021 at 22:59
  • The theta parameter is only used to fix phi, rather than solve for it in the regression. I agree with @Ben Bolker that what you want is not possible with mgcv. You certainly can't do a beta regression with an identity link because the (0,1) constraints wont be respected. Commented Oct 29, 2021 at 0:55
  • I think the OP wants to estimate the dispersion parameter on the identity scale, not the location parameter - although there's still a potential problem because the identity link won't constrain the dispersion to be positive ... Commented Oct 29, 2021 at 13:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.