| Type: | Package |
| Title: | Regional Consistency Evaluation and Sample Size Calculation for MRCTs |
| Version: | 0.2.0 |
| 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>. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| NeedsCompilation: | no |
| RoxygenNote: | 7.3.3 |
| Depends: | R (≥ 3.5.0) |
| Imports: | stats, mvtnorm, utils |
| Suggests: | testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| Packaged: | 2026-10-27 02:51:15 UTC; kunhaiqing |
| Author: | Kunhai Qing [aut, cre], Xinru Ren [aut], Jin Xu [aut] |
| Maintainer: | Kunhai Qing <kunhaiq@stu.ecnu.edu.cn> |
| Repository: | CRAN |
| Date/Publication: | 2026-11-12 10:10:02 UTC |
Regional consistency and sample size for MRCTs
Description
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.
Choosing a function
- conProb, conProb2
Fixed-effects Method I CP for one or two trials.
- regFrac, regFrac2
Regional fraction for a target Method I CP. The two-trial solver requires a symmetric design.
- conProbII, conProbII2
Probability that all regional effects are nonnegative, for one or two trials.
- ssCPnorm, ssCPbinary
Random-effects design for normal or binary endpoints.
- ssCPsurvPH, ssCPsurvNPH
Random-effects design for survival endpoints.
- CPlbd
Lower bound on random-effects Method I CP.
- regATE_dr
Covariate-adjusted regional ATE from participant-level data.
Conventions
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.
Author(s)
Maintainer: Kunhai Qing kunhaiq@stu.ecnu.edu.cn
Authors:
Xinru Ren
Jin Xu
References
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.
Random-effects consistency bound: Method I
Description
Calculate the Method I CP lower bound from Ren and Xu (2026) and the regional normal-endpoint counts at its equality condition.
Usage
CPlbd(
alpha,
beta,
tau_delta_r,
delta,
sigma0r,
sigma1r,
fr,
pi = 0.5,
randRatio = 1
)
Arguments
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. |
Details
Let z=z_{1-\alpha}+z_{1-\beta} and
a=(\tau/\delta)^2z^2/2.
If a<1, the function uses the bound in equation (13), with
regional control count at equality
n_{0r}=\frac{\Omega_r}{(1/a-1)\tau^2}.
If a\ge1, 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.
Value
A list with:
- CPlbd
Scalar CP lower bound, without rounding.
- n0r, n1r
Rounded regional control and treatment counts.
- nr
Regional total,
n0r + n1r.
Sample-size entries are numeric NA when the equality condition fails.
References
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.
See Also
Examples
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))
Consistency probability for one MRCT: Method I
Description
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.
Usage
conProb(
alpha,
power,
pi = 0.5,
rF,
d,
sigmaTrt,
sigmaCtrl = sigmaTrt,
randRatio = 1
)
Arguments
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. |
Details
With regional effect estimate D_r and overall estimate D,
\mathrm{CP} = \Pr(D_r \ge \pi D \mid T > z_{1-\alpha}).
The normal approximation is integrated numerically. CP depends on
alpha, power, pi and rF; the other inputs determine sample size.
Value
A list with CP (conditional consistency probability) and N
(recommended total sample size).
Sample sizes
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.
References
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.
See Also
regFrac() to solve for a regional fraction; conProb2() for two trials.
Examples
conProb(alpha = 0.05, power = 0.8, rF = 0.271,
d = 1, sigmaTrt = 4)
Pooled consistency probability for two MRCTs: Method I
Description
Calculate Method I consistency probability from pooled data, conditional on both independent trials being significant.
Usage
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
)
Arguments
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. |
Details
Treatment and control outcomes are pooled separately using their sample sizes. Overall and regional pooling weights can differ.
\Pr(D_{r,\mathrm{pool}} \ge \pi D_{\mathrm{pool}}
\mid T_1 > z_{1-\alpha}, T_2 > z_{1-\alpha}).
The conditional normal probability is integrated over both significant study results. Study 2 defaults to the corresponding study 1 inputs.
Value
A list with CP, N1 and N2: the conditional consistency
probability and recommended total sample sizes in studies 1 and 2.
Sample sizes
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.
References
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.
See Also
Examples
conProb2(alpha = 0.05, power1 = 0.8, power2 = 0.9,
rF1 = 0.141, d1 = 1, sigmaTrt1 = 4)
Consistency probability for one MRCT: Method II
Description
Calculate Method II consistency probability: all regional effect estimates are nonnegative, conditional on overall significance.
Usage
conProbII(
alpha,
power,
rF,
d,
sigmaTrt,
sigmaCtrl = sigmaTrt,
pTrt,
pCtrl,
randRatio = 1,
responseType = c("continuous", "binary"),
B = 1e+05
)
Arguments
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. |
Details
\mathrm{CP} = \Pr(D_r \ge 0 \text{ for all }r
\mid T > z_{1-\alpha}).
Continuous endpoints use a joint normal probability, retaining dependence between regional and overall effects. Numerical integration can vary slightly with the random seed.
Value
A list with CP and total sample size N.
For binary endpoints, N is the actual simulated total and the list also contains:
- nTrt, nCtrl
Actual overall treatment and control counts.
- nTrtReg, nCtrlReg
Actual regional treatment and control counts.
- achievedPower
Simulated probability of the conditioning event.
- MCSE
Monte Carlo standard error of CP.
- successes
Number of replicates meeting the conditioning event.
- consistentSuccesses
Number also meeting regional consistency.
- B
Number of simulation replicates.
Sample sizes
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.
Binary calculation
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.
References
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.
See Also
Examples
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)
Pooled consistency probability for two MRCTs: Method II
Description
Calculate Method II consistency probability from pooled regional data, conditional on both independent trials being significant.
Usage
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
)
Arguments
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. |
Details
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.
Value
A list with CP, N1 and N2. For binary endpoints, N1 and
N2 are the actual simulated totals and additional entries are:
- nTrtReg1, nCtrlReg1
Regional arm counts in study 1.
- nTrtReg2, nCtrlReg2
Regional arm counts in study 2.
- achievedPower
Simulated probability of the conditioning event.
- MCSE
Monte Carlo standard error of CP.
- successes
Number of replicates meeting the conditioning event.
- consistentSuccesses
Number also meeting regional consistency.
- B
Number of simulation replicates.
Here achievedPower is the simulated probability that both studies succeed.
Sample sizes
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.
Binary calculation
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.
References
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.
See Also
Examples
set.seed(42)
conProbII2(alpha = 0.05, power1 = 0.8, rF1 = rep(1/3, 3),
d1 = 1, sigmaTrt1 = 4)
Doubly robust estimation of a regional treatment effect
Description
Estimate the average treatment effect (ATE) in a target region using covariate information from other regions. Optionally screen source regions before borrowing information.
Usage
regATE_dr(
dat,
target_region = 1,
compute_se = TRUE,
region_wise = FALSE,
p1 = NULL,
p0 = NULL,
pi = NULL,
v1 = "const",
v0 = "const",
config = list()
)
Arguments
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 |
Details
Let D_i indicate target-region membership and
\widehat q=n^{-1}\sum_i D_i. The estimator is
\widehat\tau = \frac{1}{n\widehat q}\sum_{i=1}^n
\left[D_i\widehat\Delta(X_i)+\widehat W_{1i}\widehat U_{1i}
-\widehat W_{0i}\widehat U_{0i}\right].
Here \widehat\Delta=\widehat m_1-\widehat m_0,
\widehat U_t=Y-\widehat m_t(X), 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.
Value
A list of class regATE_dr with:
- estimate
ATE using all candidate source regions.
- se_eif, ci
Standard error and 95% Wald interval, or
NULLif disabled.- remaining_regions
All candidate source-region labels.
- config
Screening settings used.
With region_wise = TRUE, the list also contains:
- check_results
Source labels, arm-specific p-values and pass indicators.
- excluded_by_check
Excluded source labels.
- region_wise_estimate
ATE after source screening.
- region_wise_se, region_wise_ci
Its standard error and 95% interval.
- region_wise_remaining_regions
Retained source labels.
Source screening
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.
Examples
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)
Regional fraction for one MRCT: Method I
Description
Find the smallest continuous regional fraction attaining a target consistency probability under the fixed-effects model.
Usage
regFrac(
alpha,
power,
pi = 0.5,
CP = 0.8,
d = 1,
sigmaTrt = 4,
sigmaCtrl = sigmaTrt,
randRatio = 1
)
Arguments
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. |
Details
Solves conProb(...)$CP = CP for rF. A target of one returns rF = 1.
Fractions are not converted to integer regional arm counts.
Value
A list with rF (regional fraction) and N (recommended total count).
Sample sizes
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.
See Also
Examples
regFrac(alpha = 0.05, power = 0.8, CP = 0.8)
Regional fraction for two symmetric MRCTs: Method I
Description
Solve for a common regional fraction attaining the target Method I consistency probability in two independent, symmetric trials.
Usage
regFrac2(alpha, power, pi = 0.5, CP = 0.8)
Arguments
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 |
Details
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.
Value
A numeric scalar: the common regional fraction for both trials.
References
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.
See Also
conProb2() for a general two-trial CP calculation.
Examples
fraction <- regFrac2(alpha = 0.05, power = 0.8)
conProb2(alpha = 0.05, power1 = 0.8, rF1 = fraction,
d1 = 1, sigmaTrt1 = 4)
Random-effects design for a binary endpoint: Method I
Description
Calculate overall sample size and shrinkage-based Method I consistency probability from regional response probabilities.
Usage
ssCPbinary(alpha, beta, p0r, p1r, pi = 0.5, randRatio = 1, target, f)
Arguments
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. |
Details
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
\Omega_r = p_{1r}(1-p_{1r})/\ell+p_{0r}(1-p_{0r}).
This function uses a normal random-effects approximation, not binomial
simulation. For fixed-effects Method II simulation, use conProbII().
Value
A list with:
- n0, n1
Recommended overall control and treatment counts.
- n
Total count,
n0 + n1.- CP
Conditional consistency probability, without rounding.
Design assumptions
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.
References
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.
See Also
Examples
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))
Random-effects design for a normal endpoint: Method I
Description
Calculate overall sample size and conditional Method I consistency probability for an empirical shrinkage regional estimator.
Usage
ssCPnorm(
alpha,
beta,
delta,
tau,
sigma1r,
sigma0r,
pi = 0.5,
randRatio = 1,
target,
f
)
Arguments
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. |
Details
Let \ell be randRatio, z = z_{1-\alpha}+z_{1-\beta}
and \Omega_r = \sigma_{1r}^2/\ell+\sigma_{0r}^2.
The continuous control count solves
\sum_r \left(\tau^2+\frac{\Omega_r}{n_0 f_r}\right)^{-1}
= \frac{z^2}{\delta^2}.
A finite solution requires \tau z/\delta < \sqrt{R},
where R is the number of regions.
The target-region criterion is
\Pr(\widetilde D_r \ge \pi\widetilde D
\mid T > z_{1-\alpha}).
It uses the shrinkage estimator, not the raw regional mean difference.
At tau = 0, regional and overall shrinkage estimates coincide, so CP is one.
Value
A list with:
- n0, n1
Recommended overall control and treatment counts.
- n
Total count,
n0 + n1.- CP
Conditional consistency probability, without rounding.
Design assumptions
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.
References
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.
See Also
ssCPbinary(), ssCPsurvPH(), ssCPsurvNPH(), CPlbd().
Examples
ssCPnorm(alpha = 0.025, beta = 0.2, delta = 0.25, tau = 0.1,
sigma1r = 1, sigma0r = 1, target = 1, f = rep(1/3, 3))
Random-effects design using RMST: Method I
Description
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.
Usage
ssCPsurvNPH(
alpha,
beta,
lambda0a,
lambda0b,
lambda1a,
lambda1b,
breakpoint,
shape0,
scale0,
shape1,
scale1,
PW = TRUE,
unimin,
unimax,
pi = 0.5,
randRatio = 1,
target,
f,
eta
)
Arguments
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 |
Details
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
S(t)=\exp\{-(t/\mathrm{scale})^{\mathrm{shape}}\}.
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
\Omega_r=\sigma_{1r}^2/\ell+\sigma_{0r}^2.
Value
A list containing n0, n1, n and CP as in ssCPnorm(), plus:
- Dr
Treatment-minus-control RMST difference in each region.
- sigma2.1r, sigma2.0r
Treatment and control RMST variance coefficients. Divide each by its regional arm count to obtain the estimator variance.
Design assumptions
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.
References
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.
See Also
Examples
# 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))
Random-effects design for a PH endpoint: Method I
Description
Calculate sample size and shrinkage-based Method I consistency probability for exponential survival with a common fixed follow-up time.
Usage
ssCPsurvPH(alpha, beta, lambda0r, hr, pi = 0.5, randRatio = 1, target, f, L)
Arguments
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. |
Details
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 P_{kr}=1-\exp(-\lambda_{kr}L),
\Omega_r=\frac{(\ell+1)^2}{\ell(P_{0r}+\ell P_{1r})}.
For delayed effects or crossing survival curves, use ssCPsurvNPH().
Value
A list with:
- n0, n1
Recommended overall control and treatment counts.
- n
Total count,
n0 + n1.- CP
Conditional consistency probability, without rounding.
Design assumptions
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.
References
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.
See Also
Examples
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)
Legacy simulation tables for the two-MRCT paper
Description
Internal helper for the historical simulation settings in Qing et al. (2025). This is not a general design or optimization interface.
Usage
table2MRCTs(numSimu, choice, seed = 1)
Arguments
numSimu |
Positive integer number of simulation replicates. |
choice |
Table number, from 1 to 6. |
seed |
Random seed (default 1). |
Details
Tables 1–2 use one trial, tables 3–4 use two symmetric trials, and tables 5–6 use different allocation ratios and powers. Some regional fractions are fixed historical settings. Numerical results need not exactly reproduce published rounding or earlier software versions.
Value
A data frame of scenario inputs, recommended counts and empirical CP.