dm_Rdate_FPR {baker}R Documentation

Make FPR design matrix for dates with R format.

Description

dm_Rdate_FPR creates design matrices for false positive rate regressions; can also be used to standardize dates.

Usage

dm_Rdate_FPR(Rdate, Y, effect = "fixed", num_knots_FPR = NULL)

Arguments

Rdate

a vector of dates of R format

Y

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

effect

The design matrix for "random" or "fixed" effect; Default is "fixed". When specified as "fixed", it produces standardized R-format dates using control's mean and standard deviation; When specified as "random", it produces num_knots_FPR columns of design matrix for thin-plate regression splines (TPRS) fitting. One needs both "fixed" and "random" in a FPR regression formula in model_options to enable TPRS fitting. For example, model_options$likelihood$FPR_formula can be

~ AGECAT+HIV+dm_Rdate_FPR(ENRLDATE,Y,"fixed")+dm_Rdate_FPR(ENRLDATE,Y,"random",10)

means FPR regression with intercept, main effects for 'AGECAT' and 'HIV', and TPRS bases for 'ENRLDATE' using 10 knots placed at 10 equal-probability-spaced sample quantiles.

num_knots_FPR

number of knots for FPR regression; default is NULL to accommodate fixed effect specification.

Value

Design matrix for FPR regression:

See Also

nplcm()


[Package baker version 1.0.3 Index]