Learn R Programming

logbin (version 1.0)

logbin.design: Construct Design Matrix for logbin Model

Description

logbin.design constructs the design matrix for a logbin model, given a particular parameterization. This is a workhorse function -- it would not normally be called directly.

Usage

logbin.design(terms, data, allref, design.ref)

Arguments

terms
terms component of object returned from a call to logbin.allref for the desired model.
data
data component of object returned from a call to logbin.allref for the desired model.
allref
allref component of object returned from a call to logbin.allref for the desired model.
design.ref
vector of indices for a particular parameterization in 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

Value

  • A strictly non-negative design matrix to be passed to the relevant fitting function.

Details

In the CEM algorithm employed by logbin, we must consider the Cartesian product of all possible parameterizations. 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.

See Also

logbin.allref, model.matrix, contr.treatment, contr.isotonic.rev