View source: R/analyseSimData.R
analyse.simdata | R Documentation |
The power of the adaptive design
is computed according to the input method ("cvasd" for cross-validated adaptive signature design or "cvrs" for cross-validated risk scores design),
It is made up of the power for the overall
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).
For the "cvasd" method, the input tuning set eta,R,G
might be comprised of vectors. In this case,
the tuning is performed using nested cross-validation. For each outer cross-validation fold, only one inner cross-validation fold is used, to save the computational time.
analyse.simdata(
datalist,
sig = 0.05,
group.prop.sig = 0.2,
method = c("cvrs", "cvasd"),
eta = NULL,
R = NULL,
G = NULL,
seed = NULL,
plotrs = F
)
datalist |
A list of 3 data frames that corresponds to the output of the |
sig |
An overall significance level for the adaptive design. |
group.prop.sig |
Proportion of significance level for the sensitive group test. |
method |
"cvasd" (for cross-validated adaptive signature design) or "cvrs" (for cross-validated risk scores design). |
eta |
A significance level for the covariate-wise logistic regression for the "cvasd" method (double, or vector of doubles). |
R |
A threshold of the odds ratio for the "cvasd" method (double, or vector of doubles). |
G |
A threshold for the number of covariates for the "cvasd" method (integer, or vector of integers). |
seed |
A seed for the random number generator. |
plotrs |
An indicator whether to plot the risk scores for the "cvrs" method (default = FALSE). |
runs |
Number of simulation runs. |
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.
pwr.adaptive: Power for the adaptive design.
estimate.rr: Empirical response rate on the experimental arm for the sensitive group, one value per simulation run.
psens: Sensitivity of identifying the sensitive group, one value per simulation run.
pspec: Specificity of identifying the sensitive group, one value per simulation run.
sens.pred: Predicted sensitivity status (rows = patients, columns = simulations).
cvrs: A matrix of the risk scores (rows = patients, columns = simulations), for the "cvrs" method only.
eta,R,G: Significance level, threshold of the odds ratio and threshold for the number of covariates for covariate-wise logistic regression, for "cvasd" method only.
Svetlana Cherlin, James Wason
analyse.realdata
, simulate.data
and cvrs.plot
functions; print
and plot
methods.
#"cvrs" method
data(simdata)
sig = 0.05
group.prop.sig = 0.2
method = "cvrs"
seed = 123
plotrs = T
eta = NULL
R = NULL
G = NULL
simres.cvrs = analyse.simdata (simdata, sig, group.prop.sig, method, eta, R, G, seed, plotrs)
#"cvasd" method
data(simdata)
sig = 0.05
group.prop.sig = 0.2
method = "cvasd"
seed = 123
plotrs = T
eta = c(0.01, 0.02, 0.03)
R = c(2.5, 2, 1.5)
G = c(3,2,1)
simres.cvasd = analyse.simdata (simdata, sig, group.prop.sig, method, eta, R, G, seed, plotrs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.