Description Usage Arguments Value See Also Examples
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.
1 |
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. |
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. |
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.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.