View source: R/SsSampleSizeKGivenJ.R
SsSampleSizeKGivenJ | R Documentation |
Number of cases to achieve the desired power, for specified number of readers J, and specified DBM or ORH analysis method
SsSampleSizeKGivenJ(
dataset,
...,
J,
FOM,
effectSize = NULL,
method = "OR",
alpha = 0.05,
desiredPower = 0.8,
analysisOption = "RRRC",
UseDBMHB2004 = FALSE
)
dataset |
The pilot dataset. If set to NULL then variance components must be supplied. |
... |
Optional variance components, VarTR, VarTC and VarErr. These are needed if dataset is not supplied. |
J |
The number of readers in the pivotal study. |
FOM |
The figure of merit. Not needed if variance components are supplied. |
effectSize |
The effect size to be used in the pivotal study. Default is NULL. Must be supplied if dataset is set to NULL and variance components are supplied. |
method |
"OR" (default) or "DBM". |
alpha |
The significance level of the study, default is 0.05. |
desiredPower |
The desired statistical power, default is 0.8. |
analysisOption |
Specifies the random factor(s): "RRRC" (the default), "FRRC", or "RRFC". |
UseDBMHB2004 |
Logical, default is |
effectSize
= NULL uses the observed effect size in
the pilot study. A numeric value over-rides the default value. This
argument must be supplied if dataset = NULL and variance components
(the optional ... arguments) are supplied.
A list of two elements:
K |
The minimum number of cases K in the pivotal study
to just achieve the desired statistical power, calculated
for each value of |
power |
The predicted statistical power. |
The procedure is valid for ROC studies only; for FROC studies see online books.
## the following two should give identical results
SsSampleSizeKGivenJ(dataset02, FOM = "Wilcoxon", effectSize = 0.05, J = 6, method = "DBM")
a <- UtilDBMVarComp(dataset02, FOM = "Wilcoxon")$VarCom
SsSampleSizeKGivenJ(dataset = NULL, J = 6, effectSize = 0.05, method = "DBM", UseDBMHB2004 = TRUE,
list(VarTR = a["VarTR",1],
VarTC = a["VarTC",1],
VarErr = a["VarErr",1]))
## the following two should give identical results
SsSampleSizeKGivenJ(dataset02, FOM = "Wilcoxon", effectSize = 0.05, J = 6, method = "OR")
a <- UtilORVarComp(dataset02, FOM = "Wilcoxon")$VarCom
KStar <- length(dataset02$ratings$NL[1,1,,1])
SsSampleSizeKGivenJ(dataset = NULL, J = 6, effectSize = 0.05, method = "OR",
list(KStar = KStar,
VarTR = a["VarTR",1],
Cov1 = a["Cov1",1],
Cov2 = a["Cov2",1],
Cov3 = a["Cov3",1],
Var = a["Var",1]))
for (J in 6:10) {
ret <- SsSampleSizeKGivenJ(dataset02, FOM = "Wilcoxon", J = J, analysisOption = "RRRC")
message("# of readers = ", J, " estimated # of cases = ", ret$K,
", predicted power = ", signif(ret$powerRRRC,3), "\n")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.