View source: R/f_piecewise_survival_time_multiarm.R
| getPiecewiseSurvivalTimeMultiArm | R Documentation |
Creates a validated piecewise exponential survival specification for a patient-wise multi-arm simulation.
getPiecewiseSurvivalTimeMultiArm(
piecewiseSurvivalTime = NULL,
lambdaControl = NULL,
hazardRatio = NULL,
medianControl = NULL,
medianTreatments = NULL
)
piecewiseSurvivalTime |
Numeric interval start times beginning with 0. |
lambdaControl |
Non-negative, finite control hazards, one per interval.
Specify either |
hazardRatio |
One active-arm-by-interval matrix, a named list of such
matrices (one per situation), or an active-arm-by-interval-by-situation
array. In the array, situation is the slowest-changing dimension.
Specify either |
medianControl |
Positive, finite exponential control medians, one per
interval, as an alternative to |
medianTreatments |
Positive, finite exponential treatment medians, in the
same matrix, list, or array format as |
At least two finite, strictly increasing interval starts are required. The last
interval is open-ended. Hazards must be finite and non-negative; zero denotes
an interval without events. Hazard ratios must be finite and strictly positive.
Group and situation names must be unique and non-empty. Unnamed groups are positional;
named groups must agree in order. Interval columns are positional and receive
labels derived from the interval starts. Only piecewise exponential event times
are supported; simulation requires kappa = 1.
The returned time definition inherits from ParameterSet and supports names(),
print(), summary(), as.data.frame(), as.matrix(), and getObjectRCode().
Hazard ratios specify the data-generating distribution, rather than separate
interval-specific analysis estimands.
Median inputs parameterize each interval's exponential hazard through
getLambdaByMedian(median, kappa = 1). They are not the actual medians of the
complete piecewise survival distributions. The original interval medians are
retained as user-defined parameters; hazards and hazard ratios calculated from
them are marked as derived. No automatic recycling across intervals or groups
is performed.
A PiecewiseSurvivalTimeMultiArm object.
hazardRatio <- getPiecewiseHazardRatioArray(
favorable = rbind(lowDose = c(0.9, 0.8), highDose = c(0.8, 0.6)),
conservative = rbind(lowDose = c(1, 0.9), highDose = c(0.9, 0.75))
)
piecewiseTime <- getPiecewiseSurvivalTimeMultiArm(
piecewiseSurvivalTime = c(0, 6),
lambdaControl = c(0.08, 0.12),
hazardRatio = hazardRatio
)
piecewiseTime
getPiecewiseSurvivalTimeMultiArm(
piecewiseSurvivalTime = c(0, 6),
medianControl = c(12, 24),
medianTreatments = rbind(lowDose = c(15, 30), highDose = c(18, 36))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.