Does anyone know how to obtain the fitted phi parameter from the model output (mgcv GAM with a beta distribution)?
Referring to the betar gam example provided:
library(mgcv)
## Simulate some beta data...
set.seed(3);n<-400
dat <- gamSim(1,n=n)
mu <- binomial()$linkinv(dat$f/4-2)
phi <- .5
a <- mu*phi;b <- phi - a;
dat$y <- rbeta(n,a,b)
bm <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=betar(link="logit"),data=dat)
The output shows a phi estimate under "Family:Beta regression"
> bm
Family: Beta regression(0.491)
Link function: logit
Formula:
y ~ s(x0) + s(x1) + s(x2) + s(x3)
Estimated degrees of freedom:
1.73 1.63 5.62 1.00 total = 10.98