| Title: | Regional Consistency Evaluation and Sample Size Calculation for MRCTs |
|---|---|
| Description: | Calculate conditional regional consistency probabilities and sample sizes for multi-regional clinical trials under fixed-effects and random-effects models. Supports two independent trials, regional fraction selection under symmetric designs, and doubly robust regional treatment-effect estimation. Methods include Qing et al. (2025) <doi:10.1002/sim.70306> and Ren and Xu (2026) <doi:10.1002/pst.70090>. |
| Authors: | Kunhai Qing [aut, cre], Xinru Ren [aut], Jin Xu [aut] |
| Maintainer: | Kunhai Qing <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-11-12 13:16:37 UTC |
| Source: | https://github.com/cran/ssMRCT |
Tools for multi-regional clinical trial (MRCT) design and regional treatment-effect estimation. CP denotes a consistency probability conditional on overall trial significance, not overall power or interval coverage.
Fixed-effects Method I CP for one or two trials.
Regional fraction for a target Method I CP. The two-trial solver requires a symmetric design.
Probability that all regional effects are nonnegative, for one or two trials.
Random-effects design for normal or binary endpoints.
Random-effects design for survival endpoints.
Lower bound on random-effects Method I CP.
Covariate-adjusted regional ATE from participant-level data.
alpha is one-sided. Fixed-effects functions take power; random-effects
functions take beta = 1 - power. Allocation ratios are treatment/control.
Higher treatment effects indicate benefit; PH effects are negative log hazard ratios.
Analytical CP uses the continuous design. Returned integer sample sizes are recommendations, not a re-evaluation of CP after regional rounding. Binary Method II simulation instead uses the returned actual regional arm counts.
Maintainer: Kunhai Qing [email protected]
Authors:
Xinru Ren
Jin Xu
Qing, Kunhai, Xinru Ren, Shuping Jiang, Ping Yang, Menggang Yu, and Jin Xu. 2025. “Regional Consistency Evaluation and Sample Size Calculation under Two MRCTs.” Statistics in Medicine 44 (25–27): e70306. doi:10.1002/sim.70306.
Ren, Xinru, and Jin Xu. 2026. “Consistency Assessment and Regional Sample Size Calculation for MRCT under Random Effects Model.” Pharmaceutical Statistics 25 (3): e70090. doi:10.1002/pst.70090.
Calculate the probability that a regional treatment effect preserves a specified fraction of the overall effect, conditional on overall significance, under a fixed-effects model.
conProb( alpha, power, pi = 0.5, rF, d, sigmaTrt, sigmaCtrl = sigmaTrt, randRatio = 1 )conProb( alpha, power, pi = 0.5, rF, d, sigmaTrt, sigmaCtrl = sigmaTrt, randRatio = 1 )
alpha |
One-sided significance level, between 0 and 0.5. |
power |
Target overall power, with |
pi |
Fraction of the overall effect to preserve; |
rF |
Fraction of participants in the region of interest, in |
d |
Positive treatment-minus-control mean difference. |
sigmaTrt |
Positive outcome standard deviation in the treatment arm. |
sigmaCtrl |
Positive outcome standard deviation in the control arm. |
randRatio |
Treatment-to-control allocation ratio, strictly positive. |
With regional effect estimate and overall estimate ,
The normal approximation is integrated numerically. CP depends on
alpha, power, pi and rF; the other inputs determine sample size.
A list with CP (conditional consistency probability) and N
(recommended total sample size).
CP uses the continuous design at the requested power. The recommended control count is rounded up first, followed by the treatment count. Returned counts do not re-evaluate CP after integer regional allocation.
Qing, Kunhai, Xinru Ren, Shuping Jiang, Ping Yang, Menggang Yu, and Jin Xu. 2025. “Regional Consistency Evaluation and Sample Size Calculation under Two MRCTs.” Statistics in Medicine 44 (25–27): e70306. doi:10.1002/sim.70306.
regFrac() to solve for a regional fraction; conProb2() for two trials.
conProb(alpha = 0.05, power = 0.8, rF = 0.271, d = 1, sigmaTrt = 4)conProb(alpha = 0.05, power = 0.8, rF = 0.271, d = 1, sigmaTrt = 4)
Calculate Method I consistency probability from pooled data, conditional on both independent trials being significant.
conProb2( alpha, power1, power2 = power1, pi = 0.5, rF1, rF2 = rF1, d1, d2 = d1, muCtrl1 = 0, muCtrl2 = muCtrl1, sigmaTrt1, sigmaCtrl1 = sigmaTrt1, sigmaTrt2 = sigmaTrt1, sigmaCtrl2 = sigmaTrt2, randRatio1 = 1, randRatio2 = randRatio1 )conProb2( alpha, power1, power2 = power1, pi = 0.5, rF1, rF2 = rF1, d1, d2 = d1, muCtrl1 = 0, muCtrl2 = muCtrl1, sigmaTrt1, sigmaCtrl1 = sigmaTrt1, sigmaTrt2 = sigmaTrt1, sigmaCtrl2 = sigmaTrt2, randRatio1 = 1, randRatio2 = randRatio1 )
alpha |
One-sided significance level, between 0 and 0.5. |
power1, power2
|
Overall power in studies 1 and 2; each lies in |
pi |
Fraction of the overall effect to preserve; |
rF1, rF2
|
Fractions in the target region in studies 1 and 2, in |
d1, d2
|
Positive treatment-minus-control mean differences. |
muCtrl1, muCtrl2
|
Control-arm means; needed when pooling weights differ. |
sigmaTrt1, sigmaTrt2
|
Positive treatment-arm outcome standard deviations. |
sigmaCtrl1, sigmaCtrl2
|
Positive control-arm outcome standard deviations. |
randRatio1, randRatio2
|
Positive treatment-to-control allocation ratios. |
Treatment and control outcomes are pooled separately using their sample sizes. Overall and regional pooling weights can differ.
The conditional normal probability is integrated over both significant study results. Study 2 defaults to the corresponding study 1 inputs.
A list with CP, N1 and N2: the conditional consistency
probability and recommended total sample sizes in studies 1 and 2.
CP uses the continuous design at the requested power. The recommended control count is rounded up first, followed by the treatment count. Returned counts do not re-evaluate CP after integer regional allocation.
Qing, Kunhai, Xinru Ren, Shuping Jiang, Ping Yang, Menggang Yu, and Jin Xu. 2025. “Regional Consistency Evaluation and Sample Size Calculation under Two MRCTs.” Statistics in Medicine 44 (25–27): e70306. doi:10.1002/sim.70306.
conProb2(alpha = 0.05, power1 = 0.8, power2 = 0.9, rF1 = 0.141, d1 = 1, sigmaTrt1 = 4)conProb2(alpha = 0.05, power1 = 0.8, power2 = 0.9, rF1 = 0.141, d1 = 1, sigmaTrt1 = 4)
Calculate Method II consistency probability: all regional effect estimates are nonnegative, conditional on overall significance.
conProbII( alpha, power, rF, d, sigmaTrt, sigmaCtrl = sigmaTrt, pTrt, pCtrl, randRatio = 1, responseType = c("continuous", "binary"), B = 1e+05 )conProbII( alpha, power, rF, d, sigmaTrt, sigmaCtrl = sigmaTrt, pTrt, pCtrl, randRatio = 1, responseType = c("continuous", "binary"), B = 1e+05 )
alpha |
One-sided significance level, between 0 and 0.5. |
power |
Target overall power, with |
rF |
Positive fractions for all regions, summing to one. |
d, sigmaTrt, sigmaCtrl
|
Continuous-endpoint effect and standard deviations;
see |
pTrt, pCtrl
|
Treatment and control response probabilities for a binary
endpoint, strictly between zero and one, with |
randRatio |
Treatment-to-control allocation ratio, strictly positive. |
responseType |
Endpoint type: |
B |
Positive integer number of replicates; used only for binary endpoints. |
Continuous endpoints use a joint normal probability, retaining dependence between regional and overall effects. Numerical integration can vary slightly with the random seed.
A list with CP and total sample size N.
For binary endpoints, N is the actual simulated total and the list also contains:
Actual overall treatment and control counts.
Actual regional treatment and control counts.
Simulated probability of the conditioning event.
Monte Carlo standard error of CP.
Number of replicates meeting the conditioning event.
Number also meeting regional consistency.
Number of simulation replicates.
CP uses the continuous design at the requested power. The recommended control count is rounded up first, followed by the treatment count. Returned counts do not re-evaluate CP after integer regional allocation.
The function simulates regional binomial counts with separately rounded arm sizes. CP is the number of consistent overall successes divided by the number of overall successes. Zero regional effects count as consistent. Wald tests use the actual arm counts. With zero estimated variance, only a positive estimated effect rejects the null.
No overall successes gives NA for CP and its Monte Carlo standard error,
with a warning. Set the random seed for reproducibility.
Qing, Kunhai, Xinru Ren, Shuping Jiang, Ping Yang, Menggang Yu, and Jin Xu. 2025. “Regional Consistency Evaluation and Sample Size Calculation under Two MRCTs.” Statistics in Medicine 44 (25–27): e70306. doi:10.1002/sim.70306.
set.seed(42) conProbII(alpha = 0.05, power = 0.8, rF = rep(1/3, 3), d = 1, sigmaTrt = 4) conProbII(alpha = 0.05, power = 0.8, rF = rep(1/3, 3), pTrt = 0.8, pCtrl = 0.7, responseType = "binary", B = 10000)set.seed(42) conProbII(alpha = 0.05, power = 0.8, rF = rep(1/3, 3), d = 1, sigmaTrt = 4) conProbII(alpha = 0.05, power = 0.8, rF = rep(1/3, 3), pTrt = 0.8, pCtrl = 0.7, responseType = "binary", B = 10000)
Calculate Method II consistency probability from pooled regional data, conditional on both independent trials being significant.
conProbII2( alpha, power1, power2 = power1, rF1, rF2 = rF1, d1, d2 = d1, sigmaTrt1, sigmaCtrl1 = sigmaTrt1, sigmaTrt2 = sigmaTrt1, sigmaCtrl2 = sigmaTrt2, pTrt1, pCtrl1, pTrt2 = pTrt1, pCtrl2 = pCtrl1, randRatio1 = 1, randRatio2 = randRatio1, responseType = c("continuous", "binary"), B = 1e+05, muCtrl1 = 0, muCtrl2 = muCtrl1 )conProbII2( alpha, power1, power2 = power1, rF1, rF2 = rF1, d1, d2 = d1, sigmaTrt1, sigmaCtrl1 = sigmaTrt1, sigmaTrt2 = sigmaTrt1, sigmaCtrl2 = sigmaTrt2, pTrt1, pCtrl1, pTrt2 = pTrt1, pCtrl2 = pCtrl1, randRatio1 = 1, randRatio2 = randRatio1, responseType = c("continuous", "binary"), B = 1e+05, muCtrl1 = 0, muCtrl2 = muCtrl1 )
alpha |
One-sided significance level, between 0 and 0.5. |
power1, power2
|
Overall power in studies 1 and 2; each lies in |
rF1, rF2
|
Positive regional fraction vectors, each summing to one and listing the same regions in the same order. |
d1, d2
|
Positive continuous-endpoint effects; ignored for binary endpoints. |
sigmaTrt1, sigmaTrt2
|
Positive treatment-arm outcome standard deviations. |
sigmaCtrl1, sigmaCtrl2
|
Positive control-arm outcome standard deviations. |
pTrt1, pTrt2
|
Treatment response probabilities for binary endpoints, strictly between zero and one. |
pCtrl1, pCtrl2
|
Control response probabilities for binary endpoints, strictly between zero and the corresponding treatment probability. |
randRatio1, randRatio2
|
Positive treatment-to-control allocation ratios. |
responseType |
Endpoint type: |
B |
Positive integer number of replicates; used only for binary endpoints. |
muCtrl1, muCtrl2
|
Control means for continuous endpoints only. |
Consistency requires every pooled regional effect to be nonnegative. Treatment and control outcomes are pooled separately. The conditioning event is significance in both trials, not in a single pooled test. For continuous endpoints, a joint normal calculation accounts for regional/overall dependence and different control means. Set the seed for reproducible numerical integration or simulation.
A list with CP, N1 and N2. For binary endpoints, N1 and
N2 are the actual simulated totals and additional entries are:
Regional arm counts in study 1.
Regional arm counts in study 2.
Simulated probability of the conditioning event.
Monte Carlo standard error of CP.
Number of replicates meeting the conditioning event.
Number also meeting regional consistency.
Number of simulation replicates.
Here achievedPower is the simulated probability that both studies succeed.
CP uses the continuous design at the requested power. The recommended control count is rounded up first, followed by the treatment count. Returned counts do not re-evaluate CP after integer regional allocation.
The function simulates regional binomial counts with separately rounded arm sizes. CP is the number of consistent overall successes divided by the number of overall successes. Zero regional effects count as consistent. Wald tests use the actual arm counts. With zero estimated variance, only a positive estimated effect rejects the null.
No overall successes gives NA for CP and its Monte Carlo standard error,
with a warning. Set the random seed for reproducibility.
Qing, Kunhai, Xinru Ren, Shuping Jiang, Ping Yang, Menggang Yu, and Jin Xu. 2025. “Regional Consistency Evaluation and Sample Size Calculation under Two MRCTs.” Statistics in Medicine 44 (25–27): e70306. doi:10.1002/sim.70306.
set.seed(42) conProbII2(alpha = 0.05, power1 = 0.8, rF1 = rep(1/3, 3), d1 = 1, sigmaTrt1 = 4)set.seed(42) conProbII2(alpha = 0.05, power1 = 0.8, rF1 = rep(1/3, 3), d1 = 1, sigmaTrt1 = 4)
Calculate the Method I CP lower bound from Ren and Xu (2026) and the regional normal-endpoint counts at its equality condition.
CPlbd( alpha, beta, tau_delta_r, delta, sigma0r, sigma1r, fr, pi = 0.5, randRatio = 1 )CPlbd( alpha, beta, tau_delta_r, delta, sigma0r, sigma1r, fr, pi = 0.5, randRatio = 1 )
alpha |
One-sided significance level, between 0 and 0.5. |
beta |
Type II error probability; |
tau_delta_r |
Positive ratio |
delta |
Positive mean of the regional treatment-effect distribution. |
sigma0r, sigma1r
|
Positive control and treatment outcome standard
deviations; scalars or vectors of length |
fr |
Fractions of the regions of interest, each in |
pi |
Fraction of the overall effect to preserve; |
randRatio |
Treatment-to-control allocation ratio, strictly positive. |
Let and
.
If , the function uses the bound in equation (13), with
regional control count at equality
If , it uses equation (14), and equality counts are NA.
These counts describe the regional equality condition, not a complete
multi-region allocation satisfying the overall design equation.
A list with:
Scalar CP lower bound, without rounding.
Rounded regional control and treatment counts.
Regional total, n0r + n1r.
Sample-size entries are numeric NA when the equality condition fails.
Ren, Xinru, and Jin Xu. 2026. “Consistency Assessment and Regional Sample Size Calculation for MRCT under Random Effects Model.” Pharmaceutical Statistics 25 (3): e70090. doi:10.1002/pst.70090.
CPlbd(alpha = 0.05, beta = 0.2, tau_delta_r = 0.4, delta = 0.25, sigma0r = 1, sigma1r = 1, fr = c(0.1, 0.5))CPlbd(alpha = 0.05, beta = 0.2, tau_delta_r = 0.4, delta = 0.25, sigma0r = 1, sigma1r = 1, fr = c(0.1, 0.5))
Estimate the average treatment effect (ATE) in a target region using covariate information from other regions. Optionally screen source regions before borrowing information.
regATE_dr( dat, target_region = 1, compute_se = TRUE, region_wise = FALSE, p1 = NULL, p0 = NULL, pi = NULL, v1 = "const", v0 = "const", config = list() )regATE_dr( dat, target_region = 1, compute_se = TRUE, region_wise = FALSE, p1 = NULL, p0 = NULL, pi = NULL, v1 = "const", v0 = "const", config = list() )
dat |
A data frame with numeric outcome |
target_region |
A single label identifying the target region in |
compute_se |
Calculate the influence-function standard error and 95% interval. |
region_wise |
Screen each source region using separate treatment-arm and control-arm ANCOVA tests before refitting. |
p1, p0
|
Treatment assignment probabilities in the target and source
populations. Supply |
pi |
Probability of membership in the target region, given covariates.
Accepts |
v1, v0
|
Target-to-source variance ratios in the treatment and control
arms. Use a positive scalar, |
config |
A named list with optional |
Let indicate target-region membership and
. The estimator is
Here ,
, and the residual weights combine
selection scores, treatment assignment and variance ratios.
Outcome models are linear; estimated probability models are logistic.
Borrowing assumes conditional outcome-mean exchangeability across the regions retained. Double robustness concerns correct specification of either outcome models or both selection and treatment-assignment models; it does not remove the exchangeability assumption.
A list of class regATE_dr with:
ATE using all candidate source regions.
Standard error and 95% Wald interval, or NULL if disabled.
All candidate source-region labels.
Screening settings used.
With region_wise = TRUE, the list also contains:
Source labels, arm-specific p-values and pass indicators.
Excluded source labels.
ATE after source screening.
Its standard error and 95% interval.
Retained source labels.
Each arm compares y ~ X with y ~ X + D_src + X:D_src.
A source is excluded if either p-value is below check_p_threshold.
Treatment probability vectors are subset with the retained rows. Selection
probabilities are re-estimated after exclusions, because the population
changes. If no sources remain, the estimator uses only the target region.
The reported influence-function interval does not account for uncertainty
from selecting the source regions.
set.seed(42) dat <- data.frame(region = rep(1:3, each = 100), trt = rep(c(0, 1), 150), x = rnorm(300)) dat$y <- dat$x + dat$trt + rnorm(300) regATE_dr(dat, target_region = 1, p1 = 0.5, p0 = 0.5)set.seed(42) dat <- data.frame(region = rep(1:3, each = 100), trt = rep(c(0, 1), 150), x = rnorm(300)) dat$y <- dat$x + dat$trt + rnorm(300) regATE_dr(dat, target_region = 1, p1 = 0.5, p0 = 0.5)
Find the smallest continuous regional fraction attaining a target consistency probability under the fixed-effects model.
regFrac( alpha, power, pi = 0.5, CP = 0.8, d = 1, sigmaTrt = 4, sigmaCtrl = sigmaTrt, randRatio = 1 )regFrac( alpha, power, pi = 0.5, CP = 0.8, d = 1, sigmaTrt = 4, sigmaCtrl = sigmaTrt, randRatio = 1 )
alpha |
One-sided significance level, between 0 and 0.5. |
power |
Target overall power, with |
pi |
Fraction of the overall effect to preserve; |
CP |
Target consistency probability, in |
d |
Positive treatment-minus-control mean difference. |
sigmaTrt |
Positive outcome standard deviation in the treatment arm. |
sigmaCtrl |
Positive outcome standard deviation in the control arm. |
randRatio |
Treatment-to-control allocation ratio, strictly positive. |
Solves conProb(...)$CP = CP for rF. A target of one returns rF = 1.
Fractions are not converted to integer regional arm counts.
A list with rF (regional fraction) and N (recommended total count).
CP uses the continuous design at the requested power. The recommended control count is rounded up first, followed by the treatment count. Returned counts do not re-evaluate CP after integer regional allocation.
regFrac(alpha = 0.05, power = 0.8, CP = 0.8)regFrac(alpha = 0.05, power = 0.8, CP = 0.8)
Solve for a common regional fraction attaining the target Method I consistency probability in two independent, symmetric trials.
regFrac2(alpha, power, pi = 0.5, CP = 0.8)regFrac2(alpha, power, pi = 0.5, CP = 0.8)
alpha |
One-sided significance level, between 0 and 0.5. |
power |
Common overall power for both trials, with |
pi |
Fraction of the overall effect to preserve; |
CP |
Target consistency probability, in |
Both trials must have the same treatment effect, arm-specific variances, randomization ratio, power and regional fraction. The function solves for that common fraction. It does not optimize two unequal regional fractions. A target of one returns the full-region boundary.
A numeric scalar: the common regional fraction for both trials.
Qing, Kunhai, Xinru Ren, Shuping Jiang, Ping Yang, Menggang Yu, and Jin Xu. 2025. “Regional Consistency Evaluation and Sample Size Calculation under Two MRCTs.” Statistics in Medicine 44 (25–27): e70306. doi:10.1002/sim.70306.
conProb2() for a general two-trial CP calculation.
fraction <- regFrac2(alpha = 0.05, power = 0.8) conProb2(alpha = 0.05, power1 = 0.8, rF1 = fraction, d1 = 1, sigmaTrt1 = 4)fraction <- regFrac2(alpha = 0.05, power = 0.8) conProb2(alpha = 0.05, power1 = 0.8, rF1 = fraction, d1 = 1, sigmaTrt1 = 4)
Calculate overall sample size and shrinkage-based Method I consistency probability from regional response probabilities.
ssCPbinary(alpha, beta, p0r, p1r, pi = 0.5, randRatio = 1, target, f)ssCPbinary(alpha, beta, p0r, p1r, pi = 0.5, randRatio = 1, target, f)
alpha |
One-sided significance level, between 0 and 0.5. |
beta |
Type II error probability; |
p0r, p1r
|
Control and treatment response probabilities, strictly in
|
pi |
Fraction of the overall effect to preserve; |
randRatio |
Treatment-to-control allocation ratio, strictly positive. |
target |
Index of the region of interest in |
f |
Positive regional fractions summing to one. At least two regions are required. |
Regional effects are p1r - p0r. Their unweighted mean and sample
standard deviation define delta and tau; the mean must be positive.
The sampling variance component is
This function uses a normal random-effects approximation, not binomial
simulation. For fixed-effects Method II simulation, use conProbII().
A list with:
Recommended overall control and treatment counts.
Total count, n0 + n1.
Conditional consistency probability, without rounding.
Regional inputs may be scalars or vectors of length length(f).
The calculation uses a normal random-effects approximation and the
sample-size equation in ssCPnorm(). Invalid inputs and designs with
no finite solution raise errors. CP uses the continuous design;
returned group counts are rounded recommendations.
Ren, Xinru, and Jin Xu. 2026. “Consistency Assessment and Regional Sample Size Calculation for MRCT under Random Effects Model.” Pharmaceutical Statistics 25 (3): e70090. doi:10.1002/pst.70090.
ssCPbinary(alpha = 0.025, beta = 0.2, p0r = 0.3, p1r = c(0.6, 0.55, 0.5), target = 1, f = rep(1/3, 3))ssCPbinary(alpha = 0.025, beta = 0.2, p0r = 0.3, p1r = c(0.6, 0.55, 0.5), target = 1, f = rep(1/3, 3))
Calculate overall sample size and conditional Method I consistency probability for an empirical shrinkage regional estimator.
ssCPnorm( alpha, beta, delta, tau, sigma1r, sigma0r, pi = 0.5, randRatio = 1, target, f )ssCPnorm( alpha, beta, delta, tau, sigma1r, sigma0r, pi = 0.5, randRatio = 1, target, f )
alpha |
One-sided significance level, between 0 and 0.5. |
beta |
Type II error probability; |
delta |
Positive mean of the regional treatment-effect distribution. |
tau |
Nonnegative standard deviation of regional treatment effects. |
sigma1r, sigma0r
|
Positive treatment and control outcome standard deviations, as scalars or vectors with one value per region. |
pi |
Fraction of the overall effect to preserve; |
randRatio |
Treatment-to-control allocation ratio, strictly positive. |
target |
Index of the region of interest in |
f |
Positive regional fractions summing to one. At least two regions are required. |
Let be randRatio,
and .
The continuous control count solves
A finite solution requires ,
where is the number of regions.
The target-region criterion is
It uses the shrinkage estimator, not the raw regional mean difference.
At tau = 0, regional and overall shrinkage estimates coincide, so CP is one.
A list with:
Recommended overall control and treatment counts.
Total count, n0 + n1.
Conditional consistency probability, without rounding.
Regional inputs may be scalars or vectors of length length(f).
The calculation uses a normal random-effects approximation and the
sample-size equation above. Invalid inputs and designs with
no finite solution raise errors. CP uses the continuous design;
returned group counts are rounded recommendations.
Ren, Xinru, and Jin Xu. 2026. “Consistency Assessment and Regional Sample Size Calculation for MRCT under Random Effects Model.” Pharmaceutical Statistics 25 (3): e70090. doi:10.1002/pst.70090.
ssCPbinary(), ssCPsurvPH(), ssCPsurvNPH(), CPlbd().
ssCPnorm(alpha = 0.025, beta = 0.2, delta = 0.25, tau = 0.1, sigma1r = 1, sigma0r = 1, target = 1, f = rep(1/3, 3))ssCPnorm(alpha = 0.025, beta = 0.2, delta = 0.25, tau = 0.1, sigma1r = 1, sigma0r = 1, target = 1, f = rep(1/3, 3))
Calculate sample size and shrinkage-based Method I consistency probability for a treatment-minus-control restricted mean survival time (RMST) difference, allowing non-proportional hazards.
ssCPsurvNPH( alpha, beta, lambda0a, lambda0b, lambda1a, lambda1b, breakpoint, shape0, scale0, shape1, scale1, PW = TRUE, unimin, unimax, pi = 0.5, randRatio = 1, target, f, eta )ssCPsurvNPH( alpha, beta, lambda0a, lambda0b, lambda1a, lambda1b, breakpoint, shape0, scale0, shape1, scale1, PW = TRUE, unimin, unimax, pi = 0.5, randRatio = 1, target, f, eta )
alpha |
One-sided significance level, between 0 and 0.5. |
beta |
Type II error probability; |
lambda0a, lambda0b
|
Positive control hazard rates before and after
|
lambda1a, lambda1b
|
Positive treatment hazard rates before and after
|
breakpoint |
Nonnegative, common hazard change time. Used only when |
shape0, shape1
|
Positive Weibull shape parameters for control and
treatment. Used only when |
scale0, scale1
|
Positive Weibull scale parameters for control and
treatment. Used only when |
PW |
Use piecewise exponential survival ( |
unimin, unimax
|
Uniform censoring limits, with |
pi |
Fraction of the overall effect to preserve; |
randRatio |
Treatment-to-control allocation ratio, strictly positive. |
target |
Index of the region of interest in |
f |
Positive regional fractions summing to one. At least two regions are required. |
eta |
Positive common RMST horizon; must be below every |
Supply only the survival parameters needed by PW. All regional model
parameters can be scalars or vectors of length length(f).
Use the same time units for eta, breakpoint, censoring limits and scales.
With PW = TRUE, hazards change once at breakpoint.
With PW = FALSE, Weibull survival is
.
Scale equals the reciprocal exponential rate only when shape is one.
Event and censoring times are independent. Before unimin, censoring
survival equals one.
Regional effects are RMST differences; their mean and sample standard
deviation define delta and tau. The mean must be positive.
RMST variance is integrated numerically, with
.
A list containing n0, n1, n and CP as in ssCPnorm(), plus:
Treatment-minus-control RMST difference in each region.
Treatment and control RMST variance coefficients. Divide each by its regional arm count to obtain the estimator variance.
Regional inputs may be scalars or vectors of length length(f).
The calculation uses a normal random-effects approximation and the
sample-size equation in ssCPnorm(). Invalid inputs and designs with
no finite solution raise errors. CP uses the continuous design;
returned group counts are rounded recommendations.
Ren, Xinru, and Jin Xu. 2026. “Consistency Assessment and Regional Sample Size Calculation for MRCT under Random Effects Model.” Pharmaceutical Statistics 25 (3): e70090. doi:10.1002/pst.70090.
# Piecewise exponential survival ssCPsurvNPH(alpha = 0.025, beta = 0.2, lambda0a = 0.07, lambda0b = 0.04, lambda1a = c(0.02, 0.03, 0.04), lambda1b = 0.04, breakpoint = 10, unimin = 0, unimax = 240, target = 1, f = rep(1/3, 3), eta = 80) # Weibull survival: shape = 1 gives exponential survival ssCPsurvNPH(alpha = 0.025, beta = 0.2, PW = FALSE, shape0 = 1, scale0 = 10, shape1 = 1, scale1 = 15, unimin = 20, unimax = 30, eta = 10, target = 1, f = rep(1/3, 3))# Piecewise exponential survival ssCPsurvNPH(alpha = 0.025, beta = 0.2, lambda0a = 0.07, lambda0b = 0.04, lambda1a = c(0.02, 0.03, 0.04), lambda1b = 0.04, breakpoint = 10, unimin = 0, unimax = 240, target = 1, f = rep(1/3, 3), eta = 80) # Weibull survival: shape = 1 gives exponential survival ssCPsurvNPH(alpha = 0.025, beta = 0.2, PW = FALSE, shape0 = 1, scale0 = 10, shape1 = 1, scale1 = 15, unimin = 20, unimax = 30, eta = 10, target = 1, f = rep(1/3, 3))
Calculate sample size and shrinkage-based Method I consistency probability for exponential survival with a common fixed follow-up time.
ssCPsurvPH(alpha, beta, lambda0r, hr, pi = 0.5, randRatio = 1, target, f, L)ssCPsurvPH(alpha, beta, lambda0r, hr, pi = 0.5, randRatio = 1, target, f, L)
alpha |
One-sided significance level, between 0 and 0.5. |
beta |
Type II error probability; |
lambda0r |
Positive control hazard rates, as a scalar or regional vector. |
hr |
Positive treatment-to-control hazard ratios, as a scalar or
regional vector. The mean of |
pi |
Fraction of the overall effect to preserve; |
randRatio |
Treatment-to-control allocation ratio, strictly positive. |
target |
Index of the region of interest in |
f |
Positive regional fractions summing to one. At least two regions are required. |
L |
Positive follow-up duration, in the same time units as the hazard rates. |
All participants are followed for L time units. Administrative censoring
at L is the only censoring mechanism. Regional effects are -log(hr);
their mean and sample standard deviation define delta and tau.
With event probabilities ,
For delayed effects or crossing survival curves, use ssCPsurvNPH().
A list with:
Recommended overall control and treatment counts.
Total count, n0 + n1.
Conditional consistency probability, without rounding.
Regional inputs may be scalars or vectors of length length(f).
The calculation uses a normal random-effects approximation and the
sample-size equation in ssCPnorm(). Invalid inputs and designs with
no finite solution raise errors. CP uses the continuous design;
returned group counts are rounded recommendations.
Ren, Xinru, and Jin Xu. 2026. “Consistency Assessment and Regional Sample Size Calculation for MRCT under Random Effects Model.” Pharmaceutical Statistics 25 (3): e70090. doi:10.1002/pst.70090.
ssCPsurvPH(alpha = 0.025, beta = 0.2, lambda0r = 0.05, hr = c(0.7, 0.6, 0.4), target = 1, f = rep(1/3, 3), L = 36)ssCPsurvPH(alpha = 0.025, beta = 0.2, lambda0r = 0.05, hr = c(0.7, 0.6, 0.4), target = 1, f = rep(1/3, 3), L = 36)