Skip to contents

Marginal models for analyzing recurrent event data using rate-based approaches. This analysis provides population-average estimates of covariate effects on recurrent event rates, with options for marginal rate models, accelerated rate models, and gamma frailty models to handle within-subject correlation.

Usage

marginalrecurrent(
  data,
  subjectID,
  time,
  event,
  terminal_time,
  terminal_event,
  covariates,
  model_type = "marginal",
  baseline_type = "nonparametric",
  confidence_level = 0.95,
  bootstrap = TRUE,
  bootstrap_samples = 1000,
  robust_se = TRUE,
  include_cumulative = TRUE,
  include_survival = TRUE,
  time_points = "",
  plotRecurrentEvents = TRUE,
  plotCumulative = TRUE,
  plotSurvival = TRUE,
  plotResiduals = FALSE,
  showEducation = TRUE,
  showInterpretation = TRUE,
  exportResults = FALSE
)

Arguments

data

.

subjectID

.

time

.

event

.

terminal_time

.

terminal_event

.

covariates

.

model_type

.

baseline_type

.

confidence_level

.

bootstrap

.

bootstrap_samples

.

robust_se

.

include_cumulative

.

include_survival

.

time_points

.

plotRecurrentEvents

.

plotCumulative

.

plotSurvival

.

plotResiduals

.

showEducation

.

showInterpretation

.

exportResults

.

Value

A results object containing:

results$todoa html
results$modelfita table
results$coefficientsa table
results$cumulativeRatea table
results$survivalFunctiona table
results$goodnessOfFita table
results$educationalContenta html
results$interpretationContenta html
results$recurrentEventsPlotan image
results$cumulativePlotan image
results$survivalPlotan image
results$residualsPlotan image
results$exportTablea table

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$modelfit$asDF

as.data.frame(results$modelfit)

Examples

data('histopathology', package='ClinicoPath')