logbin.design constructs the design matrix for a
logbin model, given a particular parameterisation.This is a workhorse function --- it would not normally be called directly.
logbin.design(terms, data, allref, design.ref)terms component of object returned
from a call to logbin.allref for the
desired model.
data component of object returned from
a call to logbin.allref for the desired
model.
allref component of object returned
from a call to logbin.allref for the
desired model.
allref. That is, each element
corresponds to a term x in the model, and the
value of the element indicates which item in the list
allref[[x]] is the reference level in this
parameterisation.
logbin, we must consider the
Cartesian product of all possible parameterisations. The
list of these for each term in the model is constructed by
a call to logbin.allref, and a list of all
possible combinations created using
expand.grid.For a particular combination of reference levels,
logbin.design constructs the associated design
matrix by transforming data. Continuous covariates
are transformed such that their minimum or maximum observed
value corresponds to a transformed value of zero;
categorical covariates are transformed by using either
contr.treatment with a specified reference
level or contr.isotonic.rev so that the levels
are increasing in the specified order.
logbin.allref, model.matrix,
contr.treatment, contr.isotonic.rev