Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


VGAM (version 1.0-6)

loglinb3: Loglinear Model for Three Binary Responses

Description

Fits a loglinear model to three binary responses.

Usage

loglinb3(exchangeable = FALSE, zero = c("u12", "u13", "u23"))

Arguments

exchangeable

Logical. If TRUE, the three marginal probabilities are constrained to be equal.

zero

Which linear/additive predictors are modelled as intercept-only? A NULL means none. See CommonVGAMffArguments for further information.

Value

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, rrvglm and vgam.

When fitted, the fitted.values slot of the object contains the eight joint probabilities, labelled as (Y1,Y2,Y3) = (0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0), (1,1,1), respectively.

Details

The model is P(Y1=y1,Y2=y2,Y3=y3)= exp(u0+u1y1+u2y2+u3y3+u12y1y2+u13y1y3+u23y2y3) where y1, y2 and y3 are 0 or 1, and the parameters are u1, u2, u3, u12, u13, u23. The normalizing parameter u0 can be expressed as a function of the other parameters. Note that a third-order association parameter, u123 for the product y1y2y3, is assumed to be zero for this family function.

The linear/additive predictors are (η1,η2,,η6)T=(u1,u2,u3,u12,u13,u23)T.

References

Yee, T. W. and Wild, C. J. (2001) Discussion to: ``Smoothing spline ANOVA for multivariate Bernoulli observations, with application to ophthalmology data (with discussion)'' by Gao, F., Wahba, G., Klein, R., Klein, B. Journal of the American Statistical Association, 96, 127--160.

McCullagh, P. and Nelder, J. A. (1989) Generalized Linear Models, 2nd ed. London: Chapman & Hall.

See Also

loglinb2, hunua.

Examples

Run this code
# NOT RUN {
lfit <- vglm(cbind(cyadea, beitaw, kniexc) ~ altitude, loglinb3,
             data = hunua, trace = TRUE)
coef(lfit, matrix = TRUE)
head(fitted(lfit))
summary(lfit)
# }

Run the code above in your browser using DataLab