Learn R Programming

logbin (version 1.0)

logbin.smooth.allref: Parameterization for CEM Algorithm with Smooth Terms

Description

A workhorse function for logbin.smooth, logbin.smooth.allref takes the formula and data for a log-link binomial GLM with smooth terms and produces a list of all parameterizations needed for the CEM algorithm associated with the semi-parametric part of the model.

Usage

logbin.smooth.allref(object, data = environment(object), mono, 
  logbin.smooth.spec, num.knots)

Arguments

object
a terms object for the "fake.formula" associated with an logbin.smooth model (see
data
a data frame created with get_all_vars for the fake.formula.
mono
a vector indicating which terms in fake.formula should be restricted to have a monotonically non-decreasing relationship with the outcome. May be specified as names or indices of the terms.
logbin.smooth.spec
details of the smooth terms in the formula; this must be in the format returned by interpret.logbin.smooth.
num.knots
a vector containing the number of interior knots to be used for each smooth term in the model (NA for Iso terms).

Value

  • A list with components:
  • allrefa named list, with one component for each smooth term in the model. Each component is itself a list, whose components are each of the parameterizations for that term.
  • termsthe terms component of object.
  • datathe object passed into the data argument.
  • monotonica named logical vector indicating which components of terms are restricted to be monotonically non-decreasing.

Details

Semi-parametric models in logbin.smooth use an extended CEM algorithm by partioning the parameter space associated with the smooth terms into a collection of restricted parameter spaces, each corresponding to a restricted fully parametric model that can be fit using logbin. This is a workhorse function that creates the list of possible parameterizations of each smooth term. Isotonic terms and monotonic B-spline terms have only one parameterization: where the maximum fitted value occurs at the maximum of the covariate range. Unrestricted B-spline terms have k + 3 parameterizations each (where k is the number of internal knots), corresponding to the possible locations of the maximum of the smooth curve along the range of the covariate. logbin.smooth considers all possible combinations of the number of knots for each smooth term, and all possible combinations of the associated parameterizations, and logbin.smooth.design creates the appropriate formula and design matrix to be used in the call to logbin.

References

Donoghoe, M.W. and I.C. Marschner (2014): "Smooth semi-parametric adjustment of rate differences, risk differences and relative risks," Proceedings of the 29th International Workshop on Statistical Modelling, 1, 105--110.

See Also

logbin.smooth