Generate simulated endpoint data for a parallel design, with options for normal and lognormal distributions.

simParallelEndpoints(
  n,
  mu.arithmetic,
  mu.geometric = NULL,
  Sigma,
  CV = NULL,
  seed,
  dist = "normal"
)

Arguments

n

Integer. The sample size for the generated data.

mu.arithmetic

Numeric vector. The arithmetic mean of the endpoints on the original scale.

mu.geometric

Numeric vector. The geometric mean of the endpoints on the original scale. Only used if dist = "lognormal".

Sigma

Matrix. Variance-covariance matrix of the raw data on the original scale. If dist = "lognormal", this matrix is transformed to the log scale.

CV

Numeric vector. Coefficient of variation (CV) of the raw data. Only used when dist = "lognormal", where it is transformed to the log scale.

seed

Integer. Seed for random number generation, ensuring reproducibility.

dist

Character. Assumed distribution of the endpoints: either "normal" or "lognormal".

Value

A matrix of simulated endpoint values for a parallel design, with dimensions n by the number of variables in mu.arithmetic or mu.geometric.

Author

Thomas Debray tdebray@fromdatatowisdom.com