betaff(link = "loge", earg=list(),
i1 = NULL, i2 = NULL, trim = 0.05,
A = 0, B = 1, zero = NULL)
Links
for more choices.
A log link (default) ensures that the parameters are positive.earg
in Links
for general information.NULL
value means it is obtained in the initialize
slot.mean()
; it is the fraction (0
to 0.5) of observations to be trimmed from each end of the response
y
before the mean is computed. This is used when computing
initial values, and guards against o"vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
rrvglm
and vgam
.beta
).
The shape parameters are positive, and
here, the limits $A$ and $B$ are known.
The mean of $Y$ is $E(Y) = A + (B-A) \times shape1 /
(shape1 + shape2)$, and these are the fitted values of the object.For the standard beta distribution the variance of $Y$ is $shape1 \times shape2 / [(1+shape1+shape2) \times (shape1+shape2)^2]$. If $\sigma^2= 1 / (1+shape1+shape2)$ then the variance of $Y$ can be written $\sigma^2 \mu (1-\mu)$ where $\mu=shape1 / (shape1 + shape2)$ is the mean of $Y$.
If $A$ and $B$ are unknown, then the beta4()
can be used to estimate these too.
Gupta, A. K. and Nadarajah, S. (2004)
Handbook of Beta Distribution and Its Applications,
NY: Marcel Dekker, Inc.
Documentation accompanying the
Beta
,
genbetaII
,
betaII
,
betabin.ab
,
betageometric
,
betaprime
,
rbetageom
,
rbetanorm
,
beta4
.y = rbeta(n=1000, shape1=exp(0), shape2=exp(1))
fit = vglm(y ~ 1, betaff(link="identity"), trace = TRUE, crit="c")
fit = vglm(y ~ 1, betaff, trace = TRUE, crit="c")
coef(fit, matrix=TRUE)
Coef(fit) # Useful for intercept-only models
Y = 5 + 8 * y # From 5 to 13, not 0 to 1
fit = vglm(Y ~ 1, betaff(A=5, B=13), trace = TRUE)
Coef(fit)
fitted(fit)[1:4,]
Run the code above in your browser using DataLab