eff_summary: Compute the summary statistics of efficacy measure with...

Description Usage Arguments Details Value Examples

View source: R/eff_summary.R

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

1
2
3
4
5
6
7
8
9
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, …, zd} from multivariate Gaussian distribution

z ~ MVN(μ, V)

, where μ and V are specified by eff.structure and eff.Sigma, respectively. Define φ be the density of N(0, σ^2) with CDF Φ, where σ^2 is set by eff.sd_trans. Then the efficacy measure is generated by taking the CDF of z:

x={x1, …, xd} = Φ(z) = { Φ(z1), …, Φ(zd)}

. Notice here the variance parameter σ^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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

phase1PRMD documentation built on March 13, 2020, 1:55 a.m.