freund61(la="loge", lap="loge", lb="loge", lbp="loge", ia=NULL, iap=NULL,
ib=NULL, ibp=NULL, independent=FALSE, zero=NULL)
p
'' stands for ``prime'').
See Links
for more choices.TRUE
then the parameters are constrained to satisfy
$\alpha=\alpha'$ and $\beta=\beta'$,
which implies that $y_1$ and $y_2$ are independent
and each have an ordinary exponential distribution."vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
and vgam
.The marginal distributions are, in general, not exponential. By default, the linear/additive predictors are $\eta_1=\log(\alpha)$, $\eta_2=\log(\alpha')$, $\eta_3=\log(\beta)$, $\eta_4=\log(\beta')$.
A special case is when $\alpha=\alpha'$ and $\beta=\beta'$, which means that $y_1$ and $y_2$ are independent, and both have an ordinary exponential distribution with means $1 / \alpha$ and $1 / \beta$ respectively.
Fisher scoring is used, and the initial values correspond to the MLEs of an intercept model. Consequently, convergence may take only one iteration.
exponential
.y1 = rexp(n <- 200, rate=4)
y2 = rexp(n, rate=8)
ymat = cbind(y1,y2)
fit = vglm(ymat ~ 1, fam=freund61, trace=TRUE)
coef(fit, matrix=TRUE)
Coef(fit)
vcov(fit)
head(fitted(fit))
summary(fit)
# y1 and y2 are independent, so fit an independence model
fit2 = vglm(ymat ~ 1, fam=freund61(indep=TRUE), trace=TRUE)
coef(fit2, matrix=TRUE)
constraints(fit2)
pchisq(2*(logLik(fit)-logLik(fit2)), df=2, lower.tail=FALSE) # p-value
Run the code above in your browser using DataLab