eff_summary {phase1PRMD}R Documentation

Compute the summary statistics of efficacy measure with specified parameters.

Description

Numerically compute the Mean, mariginal standard deviance and mariginal correlation matrix of efficacy measure generated with specified parameters. The function provides plots of marginal density of generated efficacy and correlation matrix for each dose. Check details to see the efficacy data generation procedures.

Usage

eff_summary(
  eff.structure,
  eff.Sigma,
  eff.sd_trans,
  n.sim = 3e+05,
  seed = 123,
  plot.flag = F,
  plot.title = T
)

Arguments

eff.structure

A matrix providing the mean of the multivariate Gaussian distribution in efficacy data generation. Specifically, the (i, j)th element represents the mean value of ith dose and jth cycle of the Gaussian distribution for efficacy data generation.

eff.Sigma

The covariance matrix of the multivariate Guassian distribution in efficacy data generation.

eff.sd_trans

A positive number controling the skewness of the distribution of the efficacy response.

n.sim

Number of simulations for calculation summary statistics. Default is 300,000

seed

The seed of R's random number generator. Default is 123

plot.flag

Whether output the marginal density, and correlation matrix or not. Default is FALSE.

plot.title

Whether display the title of the plot or not. Default is TRUE

Details

The user can simulate longitudinal efficacy response with different dose-efficacy and cycle-efficacy pattern using argument eff.structure, eff.Sigma and eff.sd_trans. The sampling process of efficacy response starts from generating z = {z1, \ldots, zd} from multivariate Gaussian distribution

z ~ MVN(\mu, V)

, where \mu and V are specified by eff.structure and eff.Sigma, respectively. Define \phi be the density of N(0, \sigma^2) with CDF \Phi, where \sigma^2 is set by eff.sd_trans. Then the efficacy measure is generated by taking the CDF of z:

x={x1, \ldots, xd} = \Phi(z) = { \Phi(z1), \ldots, \Phi(zd)}

. Notice here the variance parameter \sigma^2_{trans} controls the variance of the generated efficacy.

Value

eff.M

A matrix recording the efficacy mean whose (i, j)th element represents the efficacy mean of ith dose level and jth cycle

eff.cor.ls

A list with a length of dose levels numbers recording the marginal correlation matrix across cycles of efficacy data for each dose level

Examples

data("eff")       # load eff.RData from package phase1PRMD. Details see "?eff"
eff.structure = eff$Dose_Cycle_Meff["plat", "dec", , ]
eff.Sigma = eff$Sigma
eff.sd_trans = eff$sd_trans

# res <- eff_summary(eff.structure, eff.Sigma, eff.sd_trans, n.sim = 300000,
#                    seed = 123)
# res
# set a special cases and check the density and correlation plots
# eff_summary(eff.structure = matrix(eff.structure[cbind(c(1:6), c(1:6))],
#                                   nrow = 1, ncol = 6),
#             eff.Sigma, eff.sd_trans, n.sim = 300000, seed = 123,
#             plot.flag = TRUE, plot.title = FALSE)


[Package phase1PRMD version 1.0.2 Index]