Package 'HCT'

Title: Calculates Significance Criteria and Power for a Single Arm Trial
Description: Given a database of previous treatment/placebo estimates, their standard errors and sample sizes, the program calculates a significance criteria and power estimate that takes into account the among trial variation.
Authors: David A. Schoenfeld
Maintainer: David A. Schoenfeld <[email protected]>
License: GNU General Public License
Version: 0.1.3
Built: 2024-12-18 06:57:41 UTC
Source: CRAN

Help Index


Objects Created by hct for the ALS of Clinical Trial Results

Description

These are objects of class hct for the example an ALS clinical trials

Format

Two hct objects hct220ALSFRS,hct220Delta. These are fit from the collection of ALS clinical trials without and with covariate predictions, respectively. They allow the use of the functions criteria and power functions to calculate statistics of interest, such as p-values for an historically controlled ALS trial

Examples

data(ALShctObjects)
#calculate the p-value of an ALS clinical trial where he
#slope of the ALSRS was -2 with standard Error 0.2
hct220ALSFRS$power(-.2,0,.2)
#Calculate the criteria for a p-value of 0.10 one sided to us in #a pilot study
hct220ALSFRS$criteria(0.1,.2)

Comparison of a single armed study to a collection of study results from multiple previous clinical trials.

Description

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.

Usage

hct(data, estimate, standardError, N, iter = 2000, rseed = NA,
silent=TRUE,constantStderr=TRUE)

Arguments

data

A data frame of historical data one study per row.

estimate

The name or column number of the variable in data containing the estimated outcome.

standardError

The name or column number of the variable in data containing the standard error of the estimated outcome.

N

The name or column number of the variable in data containing the sample size of the study.

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 TRUE it assumes that that standard deviation for each study is known exactly this is appropriate for larger studies. If FALSE it assumes that they are proportional to a chi-square distribution with N-1 degrees of freedom and uses a hierarchical model for the patient-level variance.

Value

A hct object which is a list of four elements.

criteria

A function with signature (p,se,df==NULL) to calculate the cut-off value for statistical significance at a one sided p-value of p, with standard error of the estimate equal to se. When df=NULL a normal test is used otherwise a t-test with df degrees of freedom.

power

A function to calculate the power of a study with signature (t,delta,se,df=NULL), where t is the cuttoff value, se is the standard error of the estimate and delta is the treatment effect

effective.SD

Which is the effective standard deviation of the outcome measure. It is calculated as sqrt(sum(data[,standardError]^2*data[,N]*(data[,N]-1))/(sum(data[,N])-1))), which is what it would be if the parameter estimates were sample means. When df=NULL a normal test is used otherwise a t-test with df degrees of freedom.

fit

An object of class stanfit with the fit of the data

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.

Author(s)

David A. Schoenfeld

References

Design and analysis of a clinical trial using previous trials as historical control

Examples

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)

Print command for an hct object.

Description

Generic print command for hct object. Passes object to summary and then prints summary.

Usage

print(x,...)

Arguments

x

A hct object produced by hct.

...

Arguements passed to summary.data.frame

Value

Prints list created by summary.hct

Author(s)

David A. Schoenfeld

See Also

summary.hct


Summary function for an hct object.

Description

Summary of a hct object.

Usage

summary(object,...)

Arguments

object

hct object.

...

arguments passed to summary.data.frame

Value

A list with entries effective.SD and prior.distribution, the first is the effective.SD and the second is the summary.data.frame applied to the prior.distribution element of the hct object. Note that the prior.distribution can be considered a posterior.distribution as it is the posterior distribution of the parameters with the input data base, however it is used as a prior distribution for the purpose of analyzing the historical trial.

Author(s)

David A. Schoenfeld

See Also

hct