True.mu: Function to calculate the true value of the mean frequency...

View source: R/True.mu.R

True.muR Documentation

Function to calculate the true value of the mean frequency function.

Description

Computes the theoretical mean frequency function for the composite endpoint under the assumed data-generating mechanisim. The calculation uses the parameters stored in the simulated data.

Usage

True.mu(data, t)

Arguments

data

A data frame generated by Onesample.generate.sequential() (optionally after applying Apply.calendar.censoring()) containing composite endpoint data in long format. Each subject may contribute multiple rows corresponding to recurrent events, terminal event, or censoring.

t

A numeric vector specifying event times (time since enrollment) at which the true value of the mean frequency is evaluated.

Value

A numeric vector giving the true mean frequency evaluated at t.

References

Mao L, Lin DY. Semiparametric regression for the weighted composite endpoint of recurrent and terminal events. Biostatistics. 2016 Apr; 17(2) :390-403.

Examples

df <- Onesample.generate.sequential(size = 200, recruitment = 3, calendar = 5,
random.censor.rate = 0.05, seed = 1123)
True.mu(data = df, t = c(1.5, 2.9, 4.6))

gsMeanFreq documentation built on Feb. 17, 2026, 1:07 a.m.