loglinb3 {VGAM} | R Documentation |
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 |
zero |
Which linear/additive predictors are modelled as
intercept-only?
A |
Details
The model is
where ,
and
are 0
or 1, and the parameters are
,
,
,
,
,
.
The normalizing parameter
can be expressed as a
function of the other parameters.
Note that a third-order association parameter,
for the product
,
is assumed to be zero for this family function.
The linear/additive predictors are
.
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
= (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.
Note
The response must be a 3-column matrix of ones and zeros only. Note that each of the 8 combinations of the multivariate response need to appear in the data set, therefore data sets will need to be large in order for this family function to work. After estimation, the response attached to the object is also a 3-column matrix; possibly in the future it might change into a 8-column matrix.
Author(s)
Thomas W. Yee
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
Examples
lfit <- vglm(cbind(cyadea, beitaw, kniexc) ~ altitude, loglinb3,
data = hunua, trace = TRUE)
coef(lfit, matrix = TRUE)
head(fitted(lfit))
summary(lfit)