dm_Rdate_Eti: Make etiology design matrix for dates with R format.

View source: R/utils.R

dm_Rdate_EtiR Documentation

Make etiology design matrix for dates with R format.

Description

dm_Rdate_Eti creates design matrices for etiology regressions.

Usage

dm_Rdate_Eti(Rdate, Y, num_knots_Eti, basis_Eti = "ncs")

Arguments

Rdate

a vector of dates of R format

Y

binary case/control status; 1 for case; 0 for controls

num_knots_Eti

number of knots for etiology regression

basis_Eti

the type of basis functions to use for etiology regression. It can be "ncs" (natural cubic splines) or "tprs" (thin-plate regression splines). Default is "ncs". "tprs" will be implemented later.

Details

It is used in model_options$likeihood$Eti_formula. For example, one can specify it as:

~ AGECAT+HIV+dm_Rdate_Eti(ENRLDATE,Y,5)

to call an etiology regression with intercept, main effects for 'AGECAT' and 'HIV', and natural cubic spline bases for 'ENRLDATE' using 5 knots defined as 5 equal-probability-spaced sample quantiles.

Value

Design matrix for etiology regression:

  • Z_Eti transformed design matrix for etiology regression

See Also

nplcm()


zhenkewu/baker documentation built on May 6, 2024, 11:19 p.m.