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 (0, 1). Default is 0.5.

p0

Numeric scalar. Null hypothesis response rate. Must be in [0, 1). Default is 0.2.

PI

Numeric scalar. Effect retention threshold for Method 1. Must be in [0, 1]. Default is 0.5.

N_vec

Integer vector. Total sample sizes for each facet column. Default is c(20, 40, 100).

J

Positive integer (>= 2). Number of regions. Default is 3.

f1_seq

Numeric vector. Sequence of Region 1 allocation proportions. Each value must be in (0, 1). Default is seq(0.1, 0.9, by = 0.1).

nsim

Positive integer. Number of Monte Carlo iterations for simulation. Default is 10000.

seed

Non-negative integer. Random seed for simulation. Default is 1.

base_size

Positive numeric. Base font size in points passed to theme. Use larger values (e.g., 28) for presentation slides and smaller values (e.g., 11) for vignettes or reports. Default is 28.

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 0.5.

mu0

Numeric scalar. Null hypothesis mean. Default is 0.1.

sd

Numeric scalar. True standard deviation. Must be positive. Default is 1.

PI

Numeric scalar. Effect retention threshold for Method 1. Must be in [0, 1]. Default is 0.5.

N_vec

Integer vector. Total sample sizes for each facet column. Default is c(20, 40, 100).

J

Positive integer (>= 2). Number of regions. Default is 3.

f1_seq

Numeric vector. Sequence of Region 1 allocation proportions. Each value must be in (0, 1). Default is seq(0.1, 0.9, by = 0.1).

nsim

Positive integer. Number of Monte Carlo iterations for simulation. Default is 10000.

seed

Non-negative integer. Random seed for simulation. Default is 1.

base_size

Positive numeric. Base font size in points passed to theme. Use larger values (e.g., 28) for presentation slides and smaller values (e.g., 11) for vignettes or reports. Default is 28.

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 2.

lambda0

Numeric scalar. Expected count per patient under the historical control. Must be positive. Default is 3.

dispersion

Numeric scalar. Dispersion parameter of the negative binomial distribution. Must be positive. Default is 1.

PI

Numeric scalar. Effect retention threshold for Method 1. Must be in [0, 1]. Default is 0.5.

N_vec

Integer vector. Total sample sizes for each facet column. Default is c(20, 40, 100).

J

Positive integer (>= 2). Number of regions. Default is 3.

f1_seq

Numeric vector. Sequence of Region 1 allocation proportions. Each value must be in (0, 1). Default is seq(0.1, 0.9, by = 0.1).

nsim

Positive integer. Number of Monte Carlo iterations for simulation. Default is 10000.

seed

Non-negative integer. Random seed for simulation. Default is 1.

base_size

Positive numeric. Base font size in points passed to theme. Use larger values (e.g., 28) for presentation slides and smaller values (e.g., 11) for vignettes or reports. Default is 28.

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 log(2) / 10.

lambda0

Numeric scalar. Historical control hazard rate. Must be positive. Default is log(2) / 5.

t_a

Numeric scalar. Accrual period. Must be positive. Default is 3.

t_f

Numeric scalar. Follow-up period. Must be positive. Default is 10.

lambda_dropout

Numeric scalar or NULL. Dropout hazard rate. If NULL (default), no dropout is assumed.

PI

Numeric scalar. Effect retention threshold for Method 1. Must be in [0, 1]. Default is 0.5.

N_vec

Integer vector. Total sample sizes for each facet column. Default is c(20, 40, 100).

J

Positive integer (>= 2). Number of regions. Default is 3.

f1_seq

Numeric vector. Sequence of Region 1 allocation proportions. Each value must be in (0, 1). Default is seq(0.1, 0.9, by = 0.1).

nsim

Positive integer. Number of Monte Carlo iterations for simulation. Default is 10000.

seed

Non-negative integer. Random seed for simulation. Default is 1.

base_size

Positive numeric. Base font size in points passed to theme. Use larger values (e.g., 28) for presentation slides and smaller values (e.g., 11) for vignettes or reports. Default is 28.

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 log(2) / 10.

t_eval

Numeric scalar. Milestone evaluation time point. Must be positive. Default is 8.

S0

Numeric scalar. Historical control survival rate at t_eval. Must be in (0, 1). Default is exp(-log(2) * 8 / 5).

t_a

Numeric scalar. Accrual period. Must be positive. Default is 3.

t_f

Numeric scalar. Follow-up period. Must be positive. Default is 10.

lambda_dropout

Numeric scalar or NULL. Dropout hazard rate. If NULL (default), no dropout is assumed.

PI

Numeric scalar. Effect retention threshold for Method 1. Must be in [0, 1]. Default is 0.5.

N_vec

Integer vector. Total sample sizes for each facet column. Default is c(20, 40, 100).

J

Positive integer (>= 2). Number of regions. Default is 3.

f1_seq

Numeric vector. Sequence of Region 1 allocation proportions. Each value must be in (0, 1). Default is seq(0.1, 0.9, by = 0.1).

nsim

Positive integer. Number of Monte Carlo iterations for simulation. Default is 10000.

seed

Non-negative integer. Random seed for simulation. Default is 1.

base_size

Positive numeric. Base font size in points passed to theme. Use larger values (e.g., 28) for presentation slides and smaller values (e.g., 11) for vignettes or reports. Default is 28.

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 log(2) / 10.

tau_star

Numeric scalar. Truncation time for RMST calculation. Must be positive and no greater than the total study duration \tau = t_a + t_f. Default is 8.

mu0

Numeric scalar. Historical control RMST at tau_star, i.e., \mu_0(\tau^*) = \int_0^{\tau^*} S_0(t)\,dt. Must be positive and less than tau_star. Default is (1 - exp(-log(2) / 5 * 8)) / (log(2) / 5).

t_a

Numeric scalar. Accrual period. Must be positive. Default is 3.

t_f

Numeric scalar. Follow-up period. Must be positive. Default is 10.

lambda_dropout

Numeric scalar or NULL. Dropout hazard rate. If NULL (default), no dropout is assumed.

PI

Numeric scalar. Effect retention threshold for Method 1. Must be in [0, 1]. Default is 0.5.

N_vec

Integer vector. Total sample sizes for each facet column. Default is c(20, 40, 100).

J

Positive integer (>= 2). Number of regions. Default is 3.

f1_seq

Numeric vector. Sequence of Region 1 allocation proportions. Each value must be in (0, 1). Default is seq(0.1, 0.9, by = 0.1).

nsim

Positive integer. Number of Monte Carlo iterations for simulation. Default is 10000.

seed

Non-negative integer. Random seed for simulation. Default is 1.

base_size

Positive numeric. Base font size in points passed to theme. Use larger values (e.g., 28) for presentation slides and smaller values (e.g., 11) for vignettes or reports. Default is 28.

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 "rcp1armBinary".

...

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 "rcp1armContinuous".

...

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 "rcp1armCount".

...

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 "rcp1armHazardRatio".

...

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 "rcp1armMilestoneSurvival".

...

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 "rcp1armRMST".

...

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:

Two calculation approaches are available:

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 (0, 1).

p0

Numeric scalar. Null hypothesis response rate (baseline or historical control). Must be in [0, 1).

Nj

Integer vector. Sample sizes for each region. For example, c(10, 90) indicates Region 1 has 10 subjects and Region 2 has 90 subjects. All elements must be positive integers.

PI

Numeric scalar. Prespecified effect retention threshold for Method 1. Typically \pi \geq 0.5. Must be in [0, 1]. Default is 0.5.

approach

Character scalar. Calculation approach: "formula" for the exact solution or "simulation" for Monte Carlo simulation. Default is "formula".

nsim

Positive integer. Number of Monte Carlo iterations. Used only when approach = "simulation". Default is 10000.

seed

Non-negative integer. Random seed for reproducibility. Used only when approach = "simulation". Default is 1.

Value

An object of class "rcp1armBinary", which is a list containing:

approach

Calculation approach used ("formula" or "simulation").

nsim

Number of Monte Carlo iterations (NULL for "formula" approach).

p

True response rate under the alternative hypothesis.

p0

Null hypothesis response rate.

Nj

Sample sizes for each region.

PI

Effect retention threshold.

Method1

RCP using Method 1 (effect retention).

Method2

RCP 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:

Two calculation approaches are available:

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 \delta = \mu - \mu_0.

sd

Numeric scalar. True standard deviation, assumed common across all regions. Must be positive.

Nj

Integer vector. Sample sizes for each region. For example, c(10, 90) indicates Region 1 has 10 subjects and Region 2 has 90 subjects. All elements must be positive integers.

PI

Numeric scalar. Prespecified effect retention threshold for Method 1. Typically \pi \geq 0.5. Must be in [0, 1]. Default is 0.5.

approach

Character scalar. Calculation approach: "formula" for the closed-form solution or "simulation" for Monte Carlo simulation. Default is "formula".

nsim

Positive integer. Number of Monte Carlo iterations. Used only when approach = "simulation". Default is 10000.

seed

Non-negative integer. Random seed for reproducibility. Used only when approach = "simulation". Default is 1.

Value

An object of class "rcp1armContinuous", which is a list containing:

approach

Calculation approach used ("formula" or "simulation").

nsim

Number of Monte Carlo iterations (NULL for "formula" approach).

mu

True mean under the alternative hypothesis.

mu0

Null hypothesis mean.

sd

Standard deviation.

Nj

Sample sizes for each region.

PI

Effect retention threshold.

Method1

RCP using Method 1 (effect retention).

Method2

RCP 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:

Two evaluation methods are supported (for each scale):

Two calculation approaches are available:

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, c(10, 90) indicates Region 1 has 10 subjects and Region 2 has 90 subjects. All elements must be positive integers.

PI

Numeric scalar. Prespecified effect retention threshold for Method 1. Typically \pi \geq 0.5. Must be in [0, 1]. Default is 0.5.

approach

Character scalar. Calculation approach: "formula" for the exact solution or "simulation" for Monte Carlo simulation. Default is "formula".

nsim

Positive integer. Number of Monte Carlo iterations. Used only when approach = "simulation". Default is 10000.

seed

Non-negative integer. Random seed for reproducibility. Used only when approach = "simulation". Default is 1.

Value

An object of class "rcp1armCount", which is a list containing:

approach

Calculation approach used ("formula" or "simulation").

nsim

Number of Monte Carlo iterations (NULL for "formula" approach).

lambda

Expected count per patient under the alternative hypothesis.

lambda0

Expected count per patient under the historical control.

dispersion

Dispersion parameter.

Nj

Sample sizes for each region.

PI

Effect retention threshold.

Method1_logRR

RCP using Method 1 (log-RR scale).

Method1_linearRR

RCP using Method 1 (linear-RR scale).

Method2

RCP 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:

Two evaluation methods are supported (for each scale):

Two calculation approaches are available:

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 = \log(2) / \lambda.

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, c(10, 90) indicates Region 1 has 10 subjects and Region 2 has 90 subjects. All elements must be positive integers.

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 NULL. Dropout hazard rate. If NULL (default), no dropout is assumed. If specified, dropout times follow an exponential distribution with rate lambda_dropout.

PI

Numeric scalar. Prespecified effect retention threshold for Method 1. Typically \pi \geq 0.5. Must be in [0, 1]. Default is 0.5.

approach

Character scalar. Calculation approach: "formula" for the closed-form solution or "simulation" for Monte Carlo simulation. Default is "formula".

nsim

Positive integer. Number of Monte Carlo iterations. Used only when approach = "simulation". Default is 10000.

seed

Non-negative integer. Random seed for reproducibility. Used only when approach = "simulation". Default is 1.

Value

An object of class "rcp1armHazardRatio", which is a list containing:

approach

Calculation approach used ("formula" or "simulation").

nsim

Number of Monte Carlo iterations (NULL for "formula" approach).

lambda

True hazard rate under the alternative hypothesis.

lambda0

Historical control hazard rate.

Nj

Sample sizes for each region.

t_a

Accrual period.

t_f

Follow-up period.

tau

Total study duration (\tau = t_a + t_f).

lambda_dropout

Dropout hazard rate (NA if NULL).

PI

Effect retention threshold.

Method1_logHR

RCP using Method 1 (log-HR scale).

Method1_linearHR

RCP using Method 1 (linear-HR scale).

Method2

RCP 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:

Two calculation approaches are available:

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 t_eval. Must be in (0, 1].

Nj

Integer vector. Sample sizes for each region. For example, c(10, 90) indicates Region 1 has 10 subjects and Region 2 has 90 subjects. All elements must be positive integers.

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 NULL. Dropout hazard rate. If NULL (default), no dropout is assumed. If specified, dropout times follow an exponential distribution with rate lambda_dropout.

PI

Numeric scalar. Prespecified effect retention threshold for Method 1. Typically \pi \geq 0.5. Must be in [0, 1]. Default is 0.5.

approach

Character scalar. Calculation approach: "formula" for the closed-form (or semi-analytical) solution or "simulation" for Monte Carlo simulation. Default is "formula".

nsim

Positive integer. Number of Monte Carlo iterations. Used only when approach = "simulation". Default is 10000.

seed

Non-negative integer. Random seed for reproducibility. Used only when approach = "simulation". Default is 1.

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:

approach

Calculation approach used ("formula" or "simulation").

formula_type

For approach = "formula": either "closed-form" (when t_{\mathrm{eval}} \leq t_f) or "numerical-integration" (when t_{\mathrm{eval}} > t_f). NULL for simulation.

nsim

Number of Monte Carlo iterations (NULL for "formula" approach).

lambda

True hazard rate under the alternative hypothesis.

Nj

Sample sizes for each region.

t_a

Accrual period.

t_f

Follow-up period.

tau

Total study duration (\tau = t_a + t_f).

lambda_dropout

Dropout hazard rate (NA if NULL).

PI

Effect retention threshold.

eval_time

Milestone evaluation time point.

S0

Historical control survival rate at eval_time.

S_est

True survival rate under the alternative at eval_time: S(t) = e^{-\lambda t}.

Method1

RCP using Method 1 (effect retention).

Method2

RCP 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:

Two calculation approaches are available:

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 \tau = t_a + t_f.

mu0

Numeric scalar. Historical control RMST at tau_star, i.e., \mu_0(\tau^*) = \int_0^{\tau^*} S_0(t)\,dt. Must be positive and less than tau_star.

Nj

Integer vector. Sample sizes for each region. For example, c(10, 90) indicates Region 1 has 10 subjects and Region 2 has 90 subjects. All elements must be positive integers.

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 NULL. Dropout hazard rate. If NULL (default), no dropout is assumed. If specified, dropout times follow an exponential distribution with rate lambda_dropout.

PI

Numeric scalar. Prespecified effect retention threshold for Method 1. Typically \pi \geq 0.5. Must be in [0, 1]. Default is 0.5.

approach

Character scalar. Calculation approach: "formula" for the normal approximation or "simulation" for Monte Carlo simulation. Default is "formula".

nsim

Positive integer. Number of Monte Carlo iterations. Used only when approach = "simulation". Default is 10000.

seed

Non-negative integer. Random seed for reproducibility. Used only when approach = "simulation". Default is 1.

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:

approach

Calculation approach used ("formula" or "simulation").

formula_type

For approach = "formula": either "closed-form" (when \tau^* \leq t_f) or "numerical-integration" (when \tau^* > t_f). NULL for simulation.

nsim

Number of Monte Carlo iterations (NULL for "formula" approach).

lambda

True hazard rate under the alternative hypothesis.

Nj

Sample sizes for each region.

t_a

Accrual period.

t_f

Follow-up period.

tau

Total study duration (\tau = t_a + t_f).

lambda_dropout

Dropout hazard rate (NA if NULL).

PI

Effect retention threshold.

tau_star

Truncation time for RMST.

mu0

Historical control RMST at tau_star.

mu_est

True RMST under the alternative: \mu(\tau^*) = (1 - e^{-\lambda \tau^*}) / \lambda.

Method1

RCP using Method 1 (effect retention).

Method2

RCP 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)