| Type: | Package |
| Title: | Regional Consistency Probability for Single-Arm Multi-Regional Clinical Trials |
| Version: | 0.1.1 |
| Description: | Provides functions to calculate and visualise the Regional Consistency Probability (RCP) for single-arm multi-regional clinical trials (MRCTs) using the Effect Retention Approach (ERA). Six endpoint types are supported: continuous, binary, count (negative binomial), time-to-event via hazard ratio, milestone survival, and restricted mean survival time (RMST). For each endpoint, both a closed-form (or semi-analytical) solution and a Monte Carlo simulation approach are implemented. Two consistency evaluation methods are available: Method 1 (effect retention in Region 1 relative to the overall population) and Method 2 (simultaneous positive effect across all regions). Plotting functions generate faceted visualisations of RCP as a function of the regional allocation proportion, overlaying formula and simulation results for direct comparison. The methodology follows the Japanese MHLW guidelines for MRCTs. Abbreviations used: RCP (Regional Consistency Probability), MRCT (Multi-Regional Clinical Trial), RMST (Restricted Mean Survival Time), MHLW (Ministry of Health, Labour and Welfare). |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Language: | en-GB |
| RoxygenNote: | 7.3.3 |
| Depends: | R (≥ 4.1.0) |
| Imports: | stats, ggplot2 (≥ 3.4.0) |
| Suggests: | testthat (≥ 3.0.0), knitr, rmarkdown |
| VignetteBuilder: | knitr |
| URL: | https://gosukehommaEX.github.io/SingleArmMRCT/, https://github.com/gosukehommaEX/SingleArmMRCT |
| BugReports: | https://github.com/gosukehommaEX/SingleArmMRCT/issues |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2026-03-29 07:50:46 UTC; i_lik |
| Author: | Gosuke Homma [aut, cre] |
| Maintainer: | Gosuke Homma <my.name.is.gosuke@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-04-01 19:50:08 UTC |
Plot Regional Consistency Probability for Single-Arm MRCT (Binary Endpoint)
Description
Generate a faceted plot of Regional Consistency Probability (RCP) as a function
of the regional allocation proportion f_1 for binary endpoints.
Formula and simulation results are shown together for both Method 1 and Method 2.
Facet columns correspond to total sample sizes specified in N_vec.
Regional sample sizes are allocated as:
N_{j1} = \lfloor N \times f_1 \rfloor and
N_{j2} = \cdots = N_{jJ} = (N - N_{j1}) / (J - 1).
Usage
plot_rcp1armBinary(
p = 0.5,
p0 = 0.2,
PI = 0.5,
N_vec = c(20, 40, 100),
J = 3,
f1_seq = seq(0.1, 0.9, by = 0.1),
nsim = 10000,
seed = 1,
base_size = 28
)
Arguments
p |
Numeric scalar. True response rate under the alternative hypothesis.
Must be in |
p0 |
Numeric scalar. Null hypothesis response rate. Must be in |
PI |
Numeric scalar. Effect retention threshold for Method 1.
Must be in |
N_vec |
Integer vector. Total sample sizes for each facet column.
Default is |
J |
Positive integer (>= 2). Number of regions. Default is |
f1_seq |
Numeric vector. Sequence of Region 1 allocation proportions.
Each value must be in |
nsim |
Positive integer. Number of Monte Carlo iterations for simulation.
Default is |
seed |
Non-negative integer. Random seed for simulation. Default is |
base_size |
Positive numeric. Base font size in points passed to
|
Value
A ggplot2 object.
Examples
p <- plot_rcp1armBinary(
p = 0.5,
p0 = 0.2,
PI = 0.5,
N_vec = c(20, 40, 100),
J = 3
)
print(p)
Plot Regional Consistency Probability for Single-Arm MRCT (Continuous Endpoint)
Description
Generate a faceted plot of Regional Consistency Probability (RCP) as a function
of the regional allocation proportion f_1 for continuous endpoints.
Formula and simulation results are shown together for both Method 1 and Method 2.
Facet columns correspond to total sample sizes specified in N_vec.
Regional sample sizes are allocated as:
N_{j1} = \lfloor N \times f_1 \rfloor and
N_{j2} = \cdots = N_{jJ} = (N - N_{j1}) / (J - 1).
Usage
plot_rcp1armContinuous(
mu = 0.5,
mu0 = 0.1,
sd = 1,
PI = 0.5,
N_vec = c(20, 40, 100),
J = 3,
f1_seq = seq(0.1, 0.9, by = 0.1),
nsim = 10000,
seed = 1,
base_size = 28
)
Arguments
mu |
Numeric scalar. True mean under the alternative hypothesis.
Default is |
mu0 |
Numeric scalar. Null hypothesis mean. Default is |
sd |
Numeric scalar. True standard deviation. Must be positive.
Default is |
PI |
Numeric scalar. Effect retention threshold for Method 1.
Must be in |
N_vec |
Integer vector. Total sample sizes for each facet column.
Default is |
J |
Positive integer (>= 2). Number of regions. Default is |
f1_seq |
Numeric vector. Sequence of Region 1 allocation proportions.
Each value must be in |
nsim |
Positive integer. Number of Monte Carlo iterations for simulation.
Default is |
seed |
Non-negative integer. Random seed for simulation. Default is |
base_size |
Positive numeric. Base font size in points passed to
|
Value
A ggplot2 object.
Examples
p <- plot_rcp1armContinuous(
mu = 0.5,
mu0 = 0.1,
sd = 1,
PI = 0.5,
N_vec = c(20, 40, 100),
J = 3
)
print(p)
Plot Regional Consistency Probability for Single-Arm MRCT (Count Endpoint)
Description
Generate a faceted plot of Regional Consistency Probability (RCP) as a function
of the regional allocation proportion f_1 for count endpoints
(negative binomial model).
Formula and simulation results are shown for Method 1 (log-RR and linear-RR
scales) and Method 2. Facet rows correspond to the two Method 1 scales
(\log(RR) and 1 - RR), and facet columns correspond to total
sample sizes specified in N_vec.
Regional sample sizes are allocated as:
N_{j1} = \lfloor N \times f_1 \rfloor and
N_{j2} = \cdots = N_{jJ} = (N - N_{j1}) / (J - 1).
Usage
plot_rcp1armCount(
lambda = 2,
lambda0 = 3,
dispersion = 1,
PI = 0.5,
N_vec = c(20, 40, 100),
J = 3,
f1_seq = seq(0.1, 0.9, by = 0.1),
nsim = 10000,
seed = 1,
base_size = 28
)
Arguments
lambda |
Numeric scalar. Expected count per patient under the alternative
hypothesis. Must be positive. Default is |
lambda0 |
Numeric scalar. Expected count per patient under the historical
control. Must be positive. Default is |
dispersion |
Numeric scalar. Dispersion parameter of the negative binomial
distribution. Must be positive. Default is |
PI |
Numeric scalar. Effect retention threshold for Method 1.
Must be in |
N_vec |
Integer vector. Total sample sizes for each facet column.
Default is |
J |
Positive integer (>= 2). Number of regions. Default is |
f1_seq |
Numeric vector. Sequence of Region 1 allocation proportions.
Each value must be in |
nsim |
Positive integer. Number of Monte Carlo iterations for simulation.
Default is |
seed |
Non-negative integer. Random seed for simulation. Default is |
base_size |
Positive numeric. Base font size in points passed to
|
Value
A ggplot2 object.
Examples
p <- plot_rcp1armCount(
lambda = 2,
lambda0 = 3,
dispersion = 1,
PI = 0.5,
N_vec = c(20, 40, 100),
J = 3
)
print(p)
Plot Regional Consistency Probability for Single-Arm MRCT (Hazard Ratio Endpoint)
Description
Generate a faceted plot of Regional Consistency Probability (RCP) as a function
of the regional allocation proportion f_1 for hazard ratio endpoints.
Formula and simulation results are shown for Method 1 (log-HR and linear-HR
scales) and Method 2. Facet rows correspond to the two Method 1 scales
(\log(HR) and 1 - HR), and facet columns correspond to total
sample sizes specified in N_vec.
Regional sample sizes are allocated as:
N_{j1} = \lfloor N \times f_1 \rfloor and
N_{j2} = \cdots = N_{jJ} = (N - N_{j1}) / (J - 1).
Usage
plot_rcp1armHazardRatio(
lambda = log(2)/10,
lambda0 = log(2)/5,
t_a = 3,
t_f = 10,
lambda_dropout = NULL,
PI = 0.5,
N_vec = c(20, 40, 100),
J = 3,
f1_seq = seq(0.1, 0.9, by = 0.1),
nsim = 10000,
seed = 1,
base_size = 28
)
Arguments
lambda |
Numeric scalar. True hazard rate under the alternative hypothesis.
Must be positive. Default is |
lambda0 |
Numeric scalar. Historical control hazard rate. Must be positive.
Default is |
t_a |
Numeric scalar. Accrual period. Must be positive. Default is |
t_f |
Numeric scalar. Follow-up period. Must be positive. Default is |
lambda_dropout |
Numeric scalar or |
PI |
Numeric scalar. Effect retention threshold for Method 1.
Must be in |
N_vec |
Integer vector. Total sample sizes for each facet column.
Default is |
J |
Positive integer (>= 2). Number of regions. Default is |
f1_seq |
Numeric vector. Sequence of Region 1 allocation proportions.
Each value must be in |
nsim |
Positive integer. Number of Monte Carlo iterations for simulation.
Default is |
seed |
Non-negative integer. Random seed for simulation. Default is |
base_size |
Positive numeric. Base font size in points passed to
|
Value
A ggplot2 object.
Examples
p <- plot_rcp1armHazardRatio(
lambda = log(2) / 10,
lambda0 = log(2) / 5,
t_a = 3,
t_f = 10,
PI = 0.5,
N_vec = c(20, 40, 100),
J = 3
)
print(p)
Plot Regional Consistency Probability for Single-Arm MRCT (Milestone Survival Endpoint)
Description
Generate a faceted plot of Regional Consistency Probability (RCP) as a function
of the regional allocation proportion f_1 for milestone survival endpoints.
Formula and simulation results are shown together for both Method 1 and Method 2.
Facet columns correspond to total sample sizes specified in N_vec.
Regional sample sizes are allocated as:
N_{j1} = \lfloor N \times f_1 \rfloor and
N_{j2} = \cdots = N_{jJ} = (N - N_{j1}) / (J - 1).
Usage
plot_rcp1armMilestoneSurvival(
lambda = log(2)/10,
t_eval = 8,
S0 = exp(-log(2) * 8/5),
t_a = 3,
t_f = 10,
lambda_dropout = NULL,
PI = 0.5,
N_vec = c(20, 40, 100),
J = 3,
f1_seq = seq(0.1, 0.9, by = 0.1),
nsim = 10000,
seed = 1,
base_size = 28
)
Arguments
lambda |
Numeric scalar. True hazard rate under the alternative hypothesis.
Must be positive. Default is |
t_eval |
Numeric scalar. Milestone evaluation time point. Must be positive.
Default is |
S0 |
Numeric scalar. Historical control survival rate at |
t_a |
Numeric scalar. Accrual period. Must be positive. Default is |
t_f |
Numeric scalar. Follow-up period. Must be positive. Default is |
lambda_dropout |
Numeric scalar or |
PI |
Numeric scalar. Effect retention threshold for Method 1.
Must be in |
N_vec |
Integer vector. Total sample sizes for each facet column.
Default is |
J |
Positive integer (>= 2). Number of regions. Default is |
f1_seq |
Numeric vector. Sequence of Region 1 allocation proportions.
Each value must be in |
nsim |
Positive integer. Number of Monte Carlo iterations for simulation.
Default is |
seed |
Non-negative integer. Random seed for simulation. Default is |
base_size |
Positive numeric. Base font size in points passed to
|
Value
A ggplot2 object.
Examples
p <- plot_rcp1armMilestoneSurvival(
lambda = log(2) / 10,
t_eval = 8,
S0 = exp(-log(2) * 8 / 5),
t_a = 3,
t_f = 10,
PI = 0.5,
N_vec = c(20, 40, 100),
J = 3
)
print(p)
Plot Regional Consistency Probability for Single-Arm MRCT (RMST Endpoint)
Description
Generate a faceted plot of Regional Consistency Probability (RCP) as a function
of the regional allocation proportion f_1 for restricted mean survival
time (RMST) endpoints.
Formula and simulation results are shown together for both Method 1 and Method 2.
Facet columns correspond to total sample sizes specified in N_vec.
Regional sample sizes are allocated as:
N_{j1} = \lfloor N \times f_1 \rfloor and
N_{j2} = \cdots = N_{jJ} = (N - N_{j1}) / (J - 1).
Usage
plot_rcp1armRMST(
lambda = log(2)/10,
tau_star = 8,
mu0 = (1 - exp(-log(2)/5 * 8))/(log(2)/5),
t_a = 3,
t_f = 10,
lambda_dropout = NULL,
PI = 0.5,
N_vec = c(20, 40, 100),
J = 3,
f1_seq = seq(0.1, 0.9, by = 0.1),
nsim = 10000,
seed = 1,
base_size = 28
)
Arguments
lambda |
Numeric scalar. True hazard rate under the alternative hypothesis.
Must be positive. Default is |
tau_star |
Numeric scalar. Truncation time for RMST calculation. Must be
positive and no greater than the total study duration |
mu0 |
Numeric scalar. Historical control RMST at |
t_a |
Numeric scalar. Accrual period. Must be positive. Default is |
t_f |
Numeric scalar. Follow-up period. Must be positive. Default is |
lambda_dropout |
Numeric scalar or |
PI |
Numeric scalar. Effect retention threshold for Method 1.
Must be in |
N_vec |
Integer vector. Total sample sizes for each facet column.
Default is |
J |
Positive integer (>= 2). Number of regions. Default is |
f1_seq |
Numeric vector. Sequence of Region 1 allocation proportions.
Each value must be in |
nsim |
Positive integer. Number of Monte Carlo iterations for simulation.
Default is |
seed |
Non-negative integer. Random seed for simulation. Default is |
base_size |
Positive numeric. Base font size in points passed to
|
Value
A ggplot2 object.
Examples
lam0 <- log(2) / 5
tstar <- 8
mu0_val <- (1 - exp(-lam0 * tstar)) / lam0
p <- plot_rcp1armRMST(
lambda = log(2) / 10,
tau_star = tstar,
mu0 = mu0_val,
t_a = 3,
t_f = 10,
PI = 0.5,
N_vec = c(20, 40, 100),
J = 3
)
print(p)
Print Method for rcp1armBinary Objects
Description
Print Method for rcp1armBinary Objects
Usage
## S3 method for class 'rcp1armBinary'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (not used). |
Value
Invisibly returns the input object x.
Print Method for rcp1armContinuous Objects
Description
Print Method for rcp1armContinuous Objects
Usage
## S3 method for class 'rcp1armContinuous'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (not used). |
Value
Invisibly returns the input object x.
Print Method for rcp1armCount Objects
Description
Print Method for rcp1armCount Objects
Usage
## S3 method for class 'rcp1armCount'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (not used). |
Value
Invisibly returns the input object x.
Print Method for rcp1armHazardRatio Objects
Description
Print Method for rcp1armHazardRatio Objects
Usage
## S3 method for class 'rcp1armHazardRatio'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (not used). |
Value
Invisibly returns the input object x.
Print Method for rcp1armMilestoneSurvival Objects
Description
Print Method for rcp1armMilestoneSurvival Objects
Usage
## S3 method for class 'rcp1armMilestoneSurvival'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (not used). |
Value
Invisibly returns the input object x.
Print Method for rcp1armRMST Objects
Description
Print Method for rcp1armRMST Objects
Usage
## S3 method for class 'rcp1armRMST'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (not used). |
Value
Invisibly returns the input object x.
Regional Consistency Probability for Single-Arm MRCT (Binary Endpoint)
Description
Calculate the regional consistency probability (RCP) for binary endpoints in single-arm multi-regional clinical trials (MRCTs) using the Effect Retention Approach (ERA).
Two evaluation methods are supported:
Method 1: Effect retention approach. Evaluates whether Region 1 retains at least a fraction PI of the overall treatment effect:
Pr[(\hat{p}_1 - p_0) > \pi \times (\hat{p} - p_0)].Method 2: Simultaneous positivity across all regions. Evaluates whether all regional response rates exceed the null value:
Pr[\hat{p}_j > p_0 \text{ for all } j].
Two calculation approaches are available:
-
"formula": Exact closed-form solution via full enumeration of the binomial joint distribution. Method 1 uses a two-block decomposition (Region 1 vs regions 2..J combined), which is valid forJ \geq 2. Method 2 supportsJ \geq 2regions. -
"simulation": Monte Carlo simulation. SupportsJ \geq 2regions.
Usage
rcp1armBinary(
p,
p0,
Nj,
PI = 0.5,
approach = "formula",
nsim = 10000,
seed = 1
)
Arguments
p |
Numeric scalar. True response rate under the alternative hypothesis.
Must be in |
p0 |
Numeric scalar. Null hypothesis response rate (baseline or historical
control). Must be in |
Nj |
Integer vector. Sample sizes for each region. For example,
|
PI |
Numeric scalar. Prespecified effect retention threshold for Method 1.
Typically |
approach |
Character scalar. Calculation approach: |
nsim |
Positive integer. Number of Monte Carlo iterations. Used only when
|
seed |
Non-negative integer. Random seed for reproducibility. Used only
when |
Value
An object of class "rcp1armBinary", which is a list containing:
approachCalculation approach used (
"formula"or"simulation").nsimNumber of Monte Carlo iterations (
NULLfor"formula"approach).pTrue response rate under the alternative hypothesis.
p0Null hypothesis response rate.
NjSample sizes for each region.
PIEffect retention threshold.
Method1RCP using Method 1 (effect retention).
Method2RCP using Method 2 (all regions positive).
Examples
# Example 1: Exact solution with N = 100, Region 1 has 10 subjects
result1 <- rcp1armBinary(
p = 0.5,
p0 = 0.2,
Nj = c(10, 90),
PI = 0.5,
approach = "formula"
)
print(result1)
# Example 2: Monte Carlo simulation with N = 100, Region 1 has 10 subjects
result2 <- rcp1armBinary(
p = 0.5,
p0 = 0.2,
Nj = c(10, 90),
PI = 0.5,
approach = "simulation",
nsim = 10000,
seed = 1
)
print(result2)
Regional Consistency Probability for Single-Arm MRCT (Continuous Endpoint)
Description
Calculate the regional consistency probability (RCP) for continuous endpoints in single-arm multi-regional clinical trials (MRCTs) using the Effect Retention Approach (ERA).
Two evaluation methods are supported:
Method 1: Effect retention approach. Evaluates whether Region 1 retains at least a fraction PI of the overall treatment effect:
Pr[(\hat{\mu}_1 - \mu_0) > \pi \times (\hat{\mu} - \mu_0)].Method 2: Simultaneous positivity across all regions. Evaluates whether all regional estimates exceed the null value:
Pr[\hat{\mu}_j > \mu_0 \text{ for all } j].
Two calculation approaches are available:
-
"formula": Closed-form analytical solution based on normal approximation. Method 1 uses a two-block decomposition (Region 1 vs regions 2..J combined), which is valid forJ \geq 2. Method 2 supportsJ \geq 2regions. -
"simulation": Monte Carlo simulation. SupportsJ \geq 2regions.
Usage
rcp1armContinuous(
mu,
mu0,
sd,
Nj,
PI = 0.5,
approach = "formula",
nsim = 10000,
seed = 1
)
Arguments
mu |
Numeric scalar. True mean under the alternative hypothesis. |
mu0 |
Numeric scalar. Null hypothesis mean (baseline or historical control).
The treatment effect is defined as |
sd |
Numeric scalar. True standard deviation, assumed common across all regions. Must be positive. |
Nj |
Integer vector. Sample sizes for each region. For example,
|
PI |
Numeric scalar. Prespecified effect retention threshold for Method 1.
Typically |
approach |
Character scalar. Calculation approach: |
nsim |
Positive integer. Number of Monte Carlo iterations. Used only when
|
seed |
Non-negative integer. Random seed for reproducibility. Used only
when |
Value
An object of class "rcp1armContinuous", which is a list containing:
approachCalculation approach used (
"formula"or"simulation").nsimNumber of Monte Carlo iterations (
NULLfor"formula"approach).muTrue mean under the alternative hypothesis.
mu0Null hypothesis mean.
sdStandard deviation.
NjSample sizes for each region.
PIEffect retention threshold.
Method1RCP using Method 1 (effect retention).
Method2RCP using Method 2 (all regions positive).
Examples
# Example 1: Closed-form solution with N = 100, Region 1 has 10 subjects
result1 <- rcp1armContinuous(
mu = 0.5,
mu0 = 0.1,
sd = 1,
Nj = c(10, 90),
PI = 0.5,
approach = "formula"
)
print(result1)
# Example 2: Monte Carlo simulation with N = 100, Region 1 has 10 subjects
result2 <- rcp1armContinuous(
mu = 0.5,
mu0 = 0.1,
sd = 1,
Nj = c(10, 90),
PI = 0.5,
approach = "simulation",
nsim = 10000,
seed = 1
)
print(result2)
Regional Consistency Probability for Single-Arm MRCT (Count Endpoint)
Description
Calculate the regional consistency probability (RCP) for count (overdispersed) endpoints in single-arm multi-regional clinical trials (MRCTs) using the Effect Retention Approach (ERA).
Count data are modelled by the negative binomial distribution, and the treatment
effect is expressed as a rate ratio (RR) relative to a historical control rate
\lambda_0. Two effect scales are considered:
Log-RR scale:
\log(\widehat{RR}_j) = \log(\hat{\lambda}_j / \lambda_0).Linear-RR scale:
1 - \widehat{RR}_j = 1 - \hat{\lambda}_j / \lambda_0.
Two evaluation methods are supported (for each scale):
Method 1: Effect retention approach. Evaluates whether Region 1 retains at least a fraction PI of the overall treatment effect. Log-RR:
\log(\widehat{RR}_1) < \pi \times \log(\widehat{RR}); Linear-RR:(1 - \widehat{RR}_1) > \pi \times (1 - \widehat{RR}).Method 2: Simultaneous benefit across all regions. Evaluates whether all regional rate ratios are below 1:
\widehat{RR}_j < 1for allj. (Equivalent for both log-RR and linear-RR scales.)
Two calculation approaches are available:
-
"formula": Exact closed-form solution via full enumeration of the negative binomial joint distribution. Method 1 uses a two-block decomposition (Region 1 vs regions 2..J combined), which is valid forJ \geq 2. Method 2 supportsJ \geq 2regions. -
"simulation": Monte Carlo simulation. SupportsJ \geq 2regions.
Usage
rcp1armCount(
lambda,
lambda0,
dispersion,
Nj,
PI = 0.5,
approach = "formula",
nsim = 10000,
seed = 1
)
Arguments
lambda |
Numeric scalar. Expected count per patient under the alternative hypothesis. Must be positive. |
lambda0 |
Numeric scalar. Expected count per patient under the historical control (null hypothesis reference value). Must be positive. |
dispersion |
Numeric scalar. Dispersion parameter (size) of the negative binomial distribution, assumed common across all regions. Smaller values indicate greater overdispersion. Must be positive. |
Nj |
Integer vector. Sample sizes for each region. For example,
|
PI |
Numeric scalar. Prespecified effect retention threshold for Method 1.
Typically |
approach |
Character scalar. Calculation approach: |
nsim |
Positive integer. Number of Monte Carlo iterations. Used only when
|
seed |
Non-negative integer. Random seed for reproducibility. Used only
when |
Value
An object of class "rcp1armCount", which is a list containing:
approachCalculation approach used (
"formula"or"simulation").nsimNumber of Monte Carlo iterations (
NULLfor"formula"approach).lambdaExpected count per patient under the alternative hypothesis.
lambda0Expected count per patient under the historical control.
dispersionDispersion parameter.
NjSample sizes for each region.
PIEffect retention threshold.
Method1_logRRRCP using Method 1 (log-RR scale).
Method1_linearRRRCP using Method 1 (linear-RR scale).
Method2RCP using Method 2 (all regions show benefit; identical for log-RR and linear-RR scales).
Examples
# Example 1: Exact solution with N = 100, Region 1 has 10 subjects
result1 <- rcp1armCount(
lambda = 2,
lambda0 = 3,
dispersion = 1,
Nj = c(10, 90),
PI = 0.5,
approach = "formula"
)
print(result1)
# Example 2: Monte Carlo simulation with N = 100, Region 1 has 10 subjects
result2 <- rcp1armCount(
lambda = 2,
lambda0 = 3,
dispersion = 1,
Nj = c(10, 90),
PI = 0.5,
approach = "simulation",
nsim = 10000,
seed = 1
)
print(result2)
Regional Consistency Probability for Single-Arm MRCT (Time-to-Event Endpoint)
Description
Calculate the regional consistency probability (RCP) for time-to-event endpoints using the hazard ratio (HR) in single-arm multi-regional clinical trials (MRCTs) using the Effect Retention Approach (ERA).
Event times are modelled by the exponential distribution with hazard rate
\lambda (treatment) relative to a known historical control hazard
\lambda_0. The treatment effect is expressed as a hazard ratio:
HR = \lambda / \lambda_0 < 1 (benefit). Two effect scales are considered:
Log-HR scale:
\log(\widehat{HR}_j) = \log(\hat{\lambda}_j / \lambda_0).Linear-HR scale:
1 - \widehat{HR}_j = 1 - \hat{\lambda}_j / \lambda_0.
Two evaluation methods are supported (for each scale):
Method 1: Effect retention approach. Evaluates whether Region 1 retains at least a fraction PI of the overall treatment effect. Log-HR:
\log(\widehat{HR}_1) < \pi \times \log(\widehat{HR}); Linear-HR:(1 - \widehat{HR}_1) > \pi \times (1 - \widehat{HR}).Method 2: Simultaneous benefit across all regions. Evaluates whether all regional hazard ratios are below 1:
\widehat{HR}_j < 1for allj. (Equivalent for both log-HR and linear-HR scales.)
Two calculation approaches are available:
-
"formula": Closed-form solution based on normal approximation for\log(\widehat{HR})and the delta method for the linear-HR scale (Hayashi and Itoh 2018). Method 1 uses a two-block decomposition (Region 1 vs regions 2..J combined), which is valid forJ \geq 2. Method 2 supportsJ \geq 2regions. -
"simulation": Monte Carlo simulation using individual patient data with person-years estimation of the hazard rate. SupportsJ \geq 2regions.
Usage
rcp1armHazardRatio(
lambda,
lambda0,
Nj,
t_a,
t_f,
lambda_dropout = NULL,
PI = 0.5,
approach = "formula",
nsim = 10000,
seed = 1
)
Arguments
lambda |
Numeric scalar. True hazard rate under the alternative hypothesis.
Must be positive. Under exponential distribution, median survival =
|
lambda0 |
Numeric scalar. Known hazard rate for the historical control (null hypothesis reference value). Must be positive. |
Nj |
Integer vector. Sample sizes for each region. For example,
|
t_a |
Numeric scalar. Accrual period (patient enrolment duration). Must be positive. |
t_f |
Numeric scalar. Follow-up period (additional follow-up after accrual ends). Must be positive. |
lambda_dropout |
Numeric scalar or |
PI |
Numeric scalar. Prespecified effect retention threshold for Method 1.
Typically |
approach |
Character scalar. Calculation approach: |
nsim |
Positive integer. Number of Monte Carlo iterations. Used only when
|
seed |
Non-negative integer. Random seed for reproducibility. Used only
when |
Value
An object of class "rcp1armHazardRatio", which is a list containing:
approachCalculation approach used (
"formula"or"simulation").nsimNumber of Monte Carlo iterations (
NULLfor"formula"approach).lambdaTrue hazard rate under the alternative hypothesis.
lambda0Historical control hazard rate.
NjSample sizes for each region.
t_aAccrual period.
t_fFollow-up period.
tauTotal study duration (
\tau = t_a + t_f).lambda_dropoutDropout hazard rate (
NAifNULL).PIEffect retention threshold.
Method1_logHRRCP using Method 1 (log-HR scale).
Method1_linearHRRCP using Method 1 (linear-HR scale).
Method2RCP using Method 2 (all regions show benefit; identical for log-HR and linear-HR scales).
References
Hayashi N, Itoh Y (2017). A re-examination of Japanese sample size calculation for multi-regional clinical trial evaluating survival endpoint. Japanese Journal of Biometrics, 38(2): 79–92.
Wu J (2015). Sample size calculation for the one-sample log-rank test. Pharmaceutical Statistics, 14(1): 26–33.
Examples
# Example 1: Closed-form solution with N = 100, Region 1 has 10 subjects
result1 <- rcp1armHazardRatio(
lambda = log(2) / 10,
lambda0 = log(2) / 5,
Nj = c(10, 90),
t_a = 3,
t_f = 10,
lambda_dropout = NULL,
PI = 0.5,
approach = "formula"
)
print(result1)
# Example 2: Monte Carlo simulation with N = 100, Region 1 has 10 subjects
result2 <- rcp1armHazardRatio(
lambda = log(2) / 10,
lambda0 = log(2) / 5,
Nj = c(10, 90),
t_a = 3,
t_f = 10,
lambda_dropout = NULL,
PI = 0.5,
approach = "simulation",
nsim = 10000,
seed = 1
)
print(result2)
Regional Consistency Probability for Single-Arm MRCT (Milestone Survival Endpoint)
Description
Calculate the regional consistency probability (RCP) for milestone survival endpoints in single-arm multi-regional clinical trials (MRCTs) using the Effect Retention Approach (ERA).
Event times are modelled by the exponential distribution with hazard rate
\lambda (treatment). The treatment effect at a prespecified evaluation
time t_{\mathrm{eval}} is expressed as the difference in survival rates:
\delta = S(t_{\mathrm{eval}}) - S_0(t_{\mathrm{eval}}), where
S_0 is the historical control survival rate at t_{\mathrm{eval}}.
Two evaluation methods are supported:
Method 1: Effect retention approach. Evaluates whether Region 1 retains at least a fraction PI of the overall treatment effect:
Pr[(\hat{S}_1(t) - S_0(t)) > \pi \times (\hat{S}(t) - S_0(t))].Method 2: Simultaneous benefit across all regions. Evaluates whether all regional Kaplan-Meier estimates exceed the historical control:
Pr[\hat{S}_j(t) > S_0(t) \text{ for all } j].
Two calculation approaches are available:
-
"formula": Closed-form or semi-analytical solution based on the asymptotic variance of the Kaplan-Meier estimator derived from Greenwood's formula. Whent_{\mathrm{eval}} \leq t_f, the administrative censoring survival functionG_a(t) = 1and the variance integral has a closed-form solution. Whent_{\mathrm{eval}} > t_f, the integral is evaluated numerically viaintegrate. Method 1 uses a two-block decomposition (Region 1 vs regions 2..J combined). Method 2 supportsJ \geq 2regions. -
"simulation": Monte Carlo simulation with vectorized Kaplan-Meier estimation. SupportsJ \geq 2regions.
Usage
rcp1armMilestoneSurvival(
lambda,
t_eval,
S0,
Nj,
t_a,
t_f,
lambda_dropout = NULL,
PI = 0.5,
approach = "formula",
nsim = 10000,
seed = 1
)
Arguments
lambda |
Numeric scalar. True hazard rate under the alternative hypothesis. Must be positive. |
t_eval |
Numeric scalar. Evaluation time point for the milestone survival probability. Must be positive. |
S0 |
Numeric scalar. Historical control survival rate at |
Nj |
Integer vector. Sample sizes for each region. For example,
|
t_a |
Numeric scalar. Accrual period (patient enrolment duration). Must be positive. |
t_f |
Numeric scalar. Follow-up period (additional follow-up after accrual ends). Must be positive. |
lambda_dropout |
Numeric scalar or |
PI |
Numeric scalar. Prespecified effect retention threshold for Method 1.
Typically |
approach |
Character scalar. Calculation approach: |
nsim |
Positive integer. Number of Monte Carlo iterations. Used only when
|
seed |
Non-negative integer. Random seed for reproducibility. Used only
when |
Details
Variance formula.
The asymptotic variance of the Kaplan-Meier estimator \hat{S}_j(t) for a
single arm with N_j subjects is derived from Greenwood's formula:
\mathrm{Var}[\hat{S}_j(t)] \approx
\frac{S^2(t)}{N_j} \int_0^t \frac{\lambda(u)}{S(u) \cdot G(u)} \, du,
where G(u) = e^{-\lambda_d u} \cdot G_a(u) is the overall censoring
survival function, and
G_a(u) = \begin{cases}
1 & 0 \leq u \leq t_f, \\
(\tau - u)/t_a & t_f < u \leq \tau.
\end{cases}
Under the exponential model S(u) = e^{-\lambda u}, this simplifies to:
\mathrm{Var}[\hat{S}_j(t)] \approx
\frac{e^{-2\lambda t}}{N_j} \int_0^t
\frac{\lambda \, e^{(\lambda + \lambda_d) u}}{G_a(u)} \, du.
Closed-form solution (t_{\mathrm{eval}} \leq t_f).
When t_{\mathrm{eval}} \leq t_f, G_a(u) = 1 throughout
[0, t_{\mathrm{eval}}], and the integral reduces to:
\int_0^t \lambda \, e^{(\lambda + \lambda_d) u} \, du
= \frac{\lambda}{\lambda + \lambda_d}
\bigl( e^{(\lambda + \lambda_d) t} - 1 \bigr).
Therefore:
\mathrm{Var}[\hat{S}_j(t)] =
\frac{e^{-2\lambda t}}{N_j} \cdot
\frac{\lambda}{\lambda + \lambda_d}
\bigl( e^{(\lambda + \lambda_d) t} - 1 \bigr).
When there is no dropout (\lambda_d = 0), this further simplifies to the
binomial variance:
\mathrm{Var}[\hat{S}_j(t)] = \frac{S(t)(1 - S(t))}{N_j}.
Value
An object of class "rcp1armMilestoneSurvival", which is a list
containing:
approachCalculation approach used (
"formula"or"simulation").formula_typeFor
approach = "formula": either"closed-form"(whent_{\mathrm{eval}} \leq t_f) or"numerical-integration"(whent_{\mathrm{eval}} > t_f).NULLfor simulation.nsimNumber of Monte Carlo iterations (
NULLfor"formula"approach).lambdaTrue hazard rate under the alternative hypothesis.
NjSample sizes for each region.
t_aAccrual period.
t_fFollow-up period.
tauTotal study duration (
\tau = t_a + t_f).lambda_dropoutDropout hazard rate (
NAifNULL).PIEffect retention threshold.
eval_timeMilestone evaluation time point.
S0Historical control survival rate at
eval_time.S_estTrue survival rate under the alternative at
eval_time:S(t) = e^{-\lambda t}.Method1RCP using Method 1 (effect retention).
Method2RCP using Method 2 (all regions positive).
References
Wu J (2015). Sample size calculation for the one-sample log-rank test. Pharmaceutical Statistics, 14(1): 26–33.
Examples
# Example 1: Closed-form solution (t_eval <= t_f) with N = 100
result1 <- rcp1armMilestoneSurvival(
lambda = log(2) / 10,
t_eval = 8,
S0 = exp(-log(2) * 8 / 5),
Nj = c(10, 90),
t_a = 3,
t_f = 10,
lambda_dropout = NULL,
PI = 0.5,
approach = "formula"
)
print(result1)
# Example 2: Monte Carlo simulation with N = 100
result2 <- rcp1armMilestoneSurvival(
lambda = log(2) / 10,
t_eval = 8,
S0 = exp(-log(2) * 8 / 5),
Nj = c(10, 90),
t_a = 3,
t_f = 10,
lambda_dropout = NULL,
PI = 0.5,
approach = "simulation",
nsim = 10000,
seed = 1
)
print(result2)
Regional Consistency Probability for Single-Arm MRCT (RMST Endpoint)
Description
Calculate the regional consistency probability (RCP) for restricted mean survival time (RMST) endpoints in single-arm multi-regional clinical trials (MRCTs) using the Effect Retention Approach (ERA).
Event times are modelled by the exponential distribution with hazard rate
\lambda (treatment). The treatment effect is expressed as the difference
in RMST at a prespecified truncation time \tau^*:
\delta = \mu(\tau^*) - \mu_0(\tau^*), where \mu_0(\tau^*) is
the historical control RMST at \tau^*.
The regional RMST estimator is defined as the area under the Kaplan-Meier
curve up to \tau^*:
\hat{\mu}_j(\tau^*) = \int_0^{\tau^*} \hat{S}_j(t)\,dt.
Two evaluation methods are supported:
Method 1: Effect retention approach. Evaluates whether Region 1 retains at least a fraction PI of the overall treatment effect:
Pr[(\hat{\mu}_1 - \mu_0) > \pi \times (\hat{\mu} - \mu_0)].Method 2: Simultaneous benefit across all regions. Evaluates whether all regional RMST estimates exceed the historical control RMST:
Pr[\hat{\mu}_j > \mu_0 \text{ for all } j].
Two calculation approaches are available:
-
"formula": Normal approximation based on exponential event times and exponential dropout. When\tau^* \leq t_f(the most common setting in practice), the administrative censoring survival function equals 1 on[0, \tau^*]and the variance integral has a closed-form solution. When\tau^* > t_f, the integral is evaluated numerically viaintegrate. Method 1 uses a two-block decomposition (Region 1 vs regions 2..J combined), valid forJ \geq 2. Method 2 supportsJ \geq 2regions. -
"simulation": Monte Carlo simulation. The RMST for each simulation replicate is computed as the exact area under the Kaplan-Meier step function (sum of rectangles). SupportsJ \geq 2regions.
Usage
rcp1armRMST(
lambda,
tau_star,
mu0,
Nj,
t_a,
t_f,
lambda_dropout = NULL,
PI = 0.5,
approach = "formula",
nsim = 10000,
seed = 1
)
Arguments
lambda |
Numeric scalar. True hazard rate under the alternative hypothesis. Must be positive. |
tau_star |
Numeric scalar. Truncation time for RMST calculation. Must be
positive and no greater than the total study duration |
mu0 |
Numeric scalar. Historical control RMST at |
Nj |
Integer vector. Sample sizes for each region. For example,
|
t_a |
Numeric scalar. Accrual period (patient enrolment duration). Must be positive. |
t_f |
Numeric scalar. Follow-up period (additional follow-up after accrual ends). Must be positive. |
lambda_dropout |
Numeric scalar or |
PI |
Numeric scalar. Prespecified effect retention threshold for Method 1.
Typically |
approach |
Character scalar. Calculation approach: |
nsim |
Positive integer. Number of Monte Carlo iterations. Used only when
|
seed |
Non-negative integer. Random seed for reproducibility. Used only
when |
Details
Variance formula.
The asymptotic variance of the RMST estimator \hat{\mu}_j(\tau^*) for a
single arm with n subjects is:
\mathrm{Var}(\hat{\mu}_j(\tau^*)) \approx
\frac{1}{n} \int_0^{\tau^*}
\frac{\left(e^{-\lambda t} - e^{-\lambda \tau^*}\right)^2}
{\lambda \cdot e^{-\lambda t} \cdot G(t)}
\,dt,
where G(t) = P(\mathrm{observed\ time} \geq t) is the overall censoring
survival function:
G(t) = e^{-\lambda_d t} \times G_a(t), \quad
G_a(t) = \begin{cases}
1 & 0 \leq t \leq t_f, \\
(\tau-t)/t_a & t_f < t \leq \tau.
\end{cases}
Closed-form variance (\tau^* \leq t_f).
When \tau^* \leq t_f, G_a(t) = 1 on [0, \tau^*] and the
integrand reduces to
e^{\lambda_d t}(1 - e^{-\lambda(\tau^*-t)})^2 / \lambda.
Expanding and integrating term by term:
v(\tau^*) = \frac{1}{\lambda}\Bigl[
A(\lambda_d)
- 2 e^{-\lambda\tau^*} A(\lambda_d + \lambda)
+ e^{-2\lambda\tau^*} A(\lambda_d + 2\lambda)
\Bigr],
where A(r) = (e^{r\tau^*} - 1)/r for r > 0 and
A(0) = \tau^*.
When there is no dropout (\lambda_d = 0) this further reduces to:
v(\tau^*) = \tau^* - \frac{2(1-e^{-\lambda\tau^*})}{\lambda}
+ \frac{1-e^{-2\lambda\tau^*}}{2\lambda}.
Value
An object of class "rcp1armRMST", which is a list containing:
approachCalculation approach used (
"formula"or"simulation").formula_typeFor
approach = "formula": either"closed-form"(when\tau^* \leq t_f) or"numerical-integration"(when\tau^* > t_f).NULLfor simulation.nsimNumber of Monte Carlo iterations (
NULLfor"formula"approach).lambdaTrue hazard rate under the alternative hypothesis.
NjSample sizes for each region.
t_aAccrual period.
t_fFollow-up period.
tauTotal study duration (
\tau = t_a + t_f).lambda_dropoutDropout hazard rate (
NAifNULL).PIEffect retention threshold.
tau_starTruncation time for RMST.
mu0Historical control RMST at
tau_star.mu_estTrue RMST under the alternative:
\mu(\tau^*) = (1 - e^{-\lambda \tau^*}) / \lambda.Method1RCP using Method 1 (effect retention).
Method2RCP using Method 2 (all regions positive).
References
Wu J (2015). Sample size calculation for the one-sample log-rank test. Pharmaceutical Statistics, 14(1): 26–33.
Examples
# Example 1: Closed-form solution (tau_star <= t_f) with N = 100
lam <- log(2) / 10
lam0 <- log(2) / 5
tstar <- 8
mu0_val <- (1 - exp(-lam0 * tstar)) / lam0
result1 <- rcp1armRMST(
lambda = lam,
tau_star = tstar,
mu0 = mu0_val,
Nj = c(10, 90),
t_a = 3,
t_f = 10,
lambda_dropout = NULL,
PI = 0.5,
approach = "formula"
)
print(result1)
# Example 2: Monte Carlo simulation with N = 100
result2 <- rcp1armRMST(
lambda = lam,
tau_star = tstar,
mu0 = mu0_val,
Nj = c(10, 90),
t_a = 3,
t_f = 10,
lambda_dropout = NULL,
PI = 0.5,
approach = "simulation",
nsim = 10000,
seed = 1
)
print(result2)