PC.GLM: Fit a partly conditional GLM (logistic) model

Description Usage Arguments Value See Also Examples

Description

Fit a partly conditional (PC) logistic model. PC models are helpful predictive tools for (medical) contexts where long-term follow-up is available and interest lies in predicting patients’ risks for a future adverse outcome using repeatedly measured predictors over time. These methods model the risk of an adverse event conditional on survival up to a landmark time and information accrued by that time.

Usage

1
PC.GLM(id, stime, status, measurement.time, predictors, data, prediction.time)

Arguments

id

name of numeric subject id in data

stime

name of survival time, may be repeated across subj. id.

status

name of survival status indicator, generally 1 = bad outcome/death, 0 alive/censored.

measurement.time

name of time of measurement from baseline.

data

data.frame with id, stime, status, measurement time and marker variables. Observations with missing data will be removed.

prediction.time

numeric value for the prediction time of interest to fit the PC logistic model.

markers

character vector consisting of marker names to include.

Value

An object of class "PC_GLM" which is a list containing:

model.fit

A 'glm' object . Please note that the estimates of standard error associated with the model coefficients DO NOT incorporate the variation due to marker smoothing using BLUPs.

variable.names

vector of variable names used to fit the model.

call

Function call.

#'#'

prediction.time

Inputs from function call.

See Also

BLUP PC.Cox

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(pc_data)
#'#log transform measurement time for use in models.
pc_data$log.meas.time <- log10(pc_data$meas.time + 1)

pc.glm.1 <-  PC.GLM(
 id = "sub.id",
 stime = "time",
 status = "status",
 measurement.time = "meas.time",
 predictors = c("log.meas.time", "marker_1", "marker_2"),
 prediction.time = 24,
 data = pc_data)

pc.glm.1

pc.glm.1$model.fit #direct access to the glm model object

#see function BLUP to fit mixed effects models and obtain BLUP-smoothed predictors.

mdbrown/partlyconditional documentation built on May 22, 2019, 12:38 p.m.