View source: R/histControls_new.R
hct | R Documentation |
When comparing a single armed study to historical controls it is necessary to take into account that there may be variation in the underlying treatment/placebo effect from study to study. If this among-study variability is not accounted for the type one and two errors may be inaccurate. Given a historical database of study data, such as one might have in a meta-analysis the program calculates the criteria for significance for a new study that uses the database as an historical control and calculates the power of such as study as a function of sample size and difference to be detected.
hct(data, estimate, standardError, N, iter = 2000, rseed = NA, silent=TRUE,constantStderr=TRUE)
data |
A data frame of historical data one study per row. |
estimate |
The name or column number of the variable in
|
standardError |
The name or column number of the variable in |
N |
The name or column number of the variable in |
iter |
The number of interations to use in the MCMC to calculate the posterior distribution of the among-study variation and mean outcome measure. |
rseed |
Seed for random number generator |
silent |
Suppresses STAN output to the console |
constantStderr |
If |
A hct
object which is a list of four elements.
criteria |
A function with signature |
power |
A function to calculate the power of a study with signature |
effective.SD |
Which is the effective standard deviation of the outcome measure.
It is calculated as
|
fit |
An object of class |
A generic summary function prints out the value of effective.SD
and uses the data
frame summary
function for
data.frame(extract(fit,c("mu"","sig"","y_pred")))
. The generic print
function prints this summary.
David A. Schoenfeld
Design and analysis of a clinical trial using previous trials as historical control
als=data.frame(estimate=c(3.5,2.6,2.3),SE=c(.4,.3,.6),N=c(100,150,76)) ts=hct(als,'estimate','SE','N') print(ts) us=ts$criteria(0.025,.3) ts$power(us,5,.4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.