betadat = data.frame(y = rbeta(n=1000, shape1=exp(0), shape2=exp(1)))
fit = vglm(y ~ 1, beta.ab(lshape1="identity", lshape2="identity"),
data=betadat, trace=TRUE, crit="c")
fit = vglm(y ~ 1, beta.ab, data=betadat, trace=TRUE, crit="c")
coef(fit, matrix=TRUE)
Coef(fit) # Useful for intercept-only models
betadat = transform(betadat, Y = 5 + 8 * y) # From 5 to 13, not 0 to 1
fit = vglm(Y ~ 1, beta.ab(A=5, B=13), data=betadat, trace=TRUE)
Coef(fit)
c(meanY=with(betadat, mean(Y)), head(fitted(fit),2))
Run the code above in your browser using DataLab