stan_peps2: Fit the P2TNE model developed for the PePS2 trial to some...

View source: R/stan_peps2.R

stan_peps2R Documentation

Fit the P2TNE model developed for the PePS2 trial to some outcomes.

Description

The PePS2 trial investigates pembrolizumab in non-small-cell lung cancer. Patients may be previously treated (PT) or treatment naive (TN). Response rates in lung cancer have been shown to increase with PD-L1 tumour proportion score. PD-L1 score is measured at baseline. Each patient belongs to one of the categories <1 stratify the patient population and are used as predictive variables to stratify the analysis. The BEBOP model studies co-primary efficacy and toxicity outcomes in the presence of predictive data. Thus, PePS2 studies efficacy and toxicity in 6 distinct cohorts: TN Low, TN Medium, TN High, PT Low, PT Medium, PT High. The design admits all-comers and does not target specific sample sizes in the individual cohorts. Hyperprior parameters have defaults to match those used in PePS2, but all may be overridden. The returned object includes randomly-sampled outcomes, as well as parameters to run the model. These are all combined in the same list object for passing to RStan, as is the convention. See the accompanying vignette for a full description.

Usage

stan_peps2(
  eff,
  tox,
  cohorts,
  alpha_mean = -2.2,
  alpha_sd = 2,
  beta_mean = -0.5,
  beta_sd = 2,
  gamma_mean = -0.5,
  gamma_sd = 2,
  zeta_mean = -0.5,
  zeta_sd = 2,
  lambda_mean = -2.2,
  lambda_sd = 2,
  psi_mean = 0,
  psi_sd = 1,
  ...
)

Arguments

eff

A vector of efficacy outcomes for the patients, where 1=efficacy and 0=no efficacy.

tox

A vector of toxicity outcomes for the patients, where 1=toxicity and 0=no toxicity.

cohorts

A vector of integers from 1 to 6, denoting the cohorts to which the patients belong.

alpha_mean

The prior mean of alpha. Alpha is the efficacy model intercept.

alpha_sd

The prior standard deviation of alpha. Alpha is the efficacy model intercept.

beta_mean

The prior mean of beta. Beta is the efficacy model term for being previously treated.

beta_sd

The prior standard deviation of beta. Beta is the efficacy model term for being previously treated.

gamma_mean

The prior mean of gamma. Gamma is the efficacy model term for being PD-L1 score = Low.

gamma_sd

The prior standard deviation of gamma. Gamma is the efficacy model term for being PD-L1 score = Low.

zeta_mean

The prior mean of zeta. Zeta is the efficacy model term for being PD-L1 score = Medium.

zeta_sd

The prior standard deviation of zeta. Zeta is the efficacy model term for being PD-L1 score = Medium.

lambda_mean

The prior mean of lambda. Lambda is the toxicity model intercept.

lambda_sd

The prior standard deviation of lambda. Lambda is the toxicity model intercept.

psi_mean

The prior mean of psi. Psi is the joint model association parameter.

psi_sd

The prior standard deviation of psi. Psi is the joint model association parameter.

...

Extra parameters are passed to rstan::sampling. Commonly used options are iter, chains, warmup, cores, and control.

Value

Object of class rstan::stanfit returned by rstan::sampling

Examples

## Not run: 
fit <- stan_peps2(
  eff = c(0, 1, 0, 1, 0, 0),
  tox = c(0, 0, 1, 1, 0, 0),
  cohorts = c(3, 1, 1, 4, 5, 6)
)

## End(Not run)

trialr documentation built on April 1, 2023, 12:03 a.m.