analyse.simdata2: Compute the power for the cross-validate risk scores design...

View source: R/analyseSimData.R

analyse.simdata2R Documentation

Compute the power for the cross-validate risk scores design for simulated data with two outcomes (CVRS2)

Description

The power is computed for the two outcome variables. For each outcome variable, the power of the adaptive design is comprise of the power for the overall test and test and the power for the sensitive group test. The significance level of the test for the sensitive group is determined by the input proportion of the significance level for the sensitive group (group.prop.sig) out of the overall significance (sig).

Usage

analyse.simdata2(
  datalist,
  nclust,
  sig = 0.05,
  group.prop.sig = 0.2,
  seed = NULL,
  plotrs = F
)

Arguments

datalist

A list of 3 data frames that corresponds to the output of the simulate.data2 function (see simdata2 object): patients (a data frame with patients inormation), covar (a data frame with the covariates), response and response2 (data frames of simulated responses).

nclust

Number of clusters

sig

An overall significance level for the adaptive design.

group.prop.sig

Proportion of significance level for the sensitive group test.

seed

A seed for the random number generator.

plotrs

An indicator whether to plot the risk scores(default = FALSE).

runs

Number of simulation runs.

Value

An object of class "rapids".

patients: A data frame with patients inormation.

pwr.overall: Power for the overall test.

pwr.group: Power for the sensitive group test, a vector of length nclust

pwr.adaptive: Power for the adaptive design, a vector of length nclust

estimate.rr: Empirical rate of response on the experimental arm for the sensitive group, one value per simulation run. #return estimate.rr2: Empirical rate of response2 on the experimental arm for the sensitive group, one value per simulation run.

psens: Sensitivity of identifying the sensitive group, a vector of the length nclust per simulation run.

pspec: Specificity of identifying the sensitive group, a vector of the length nclust per simulation run.

cluster.pred: A matrix with predicted clusters (rows = patients, columns = simulations).

cvrs: A matrix of the risk scores for the response(rows = patients, columns = simulations).

cvrs2: A matrix for the risk scores for the response2 (rows = patients, columns = simulations).

Author(s)

Svetlana Cherlin, James Wason

See Also

analyse.realdata2, simulate.data2 and cvrs2.plot functions; print and plot methods.

Examples

data(simdata2)
nclust = 4
sig = 0.05
group.prop.sig = 0.2
seed = 123
plotrs = T
simres.cvrs2 = analyse.simdata2 (simdata2, nclust, sig, group.prop.sig, seed, plotrs)


svetlanache/rapids documentation built on Sept. 15, 2023, 7 a.m.