corr.test {carat}R Documentation

Corrected t-test

Description

Performs corrected t-test on treatment effects. This test follows the idea of Ma et al. (2015) <doi:10.1080/01621459.2014.922469>.

Usage

  corr.test(data, conf = 0.95)

Arguments

data

a data frame. It consists of patients' profiles, treatment assignments and outputs. See getData.

conf

confidence level of the interval. The default is 0.95.

Details

When the working model is the true underlying linear model, and the chosen covariate-adaptive design achieves that the overall imbalance and marginal imbalances for all covariates are bounded in probability, we can derive the asymptotic distribution under the null distribution, where the treatment effect of each group is the same. Subsequently, we can replace the variance estimator in a simple two sample t-test with an adjusted variance estimator. Details can be found in Ma et al.(2015).

Value

It returns an object of class "htest".

An object of class "htest" is a list containing the following components:

statistic

the value of the t-statistic.

p.value

the p-value of the test,the null hypothesis is rejected if p-value is less than the pre-determined significance level.

conf.int

a confidence interval under the chosen level conf for the difference in treatment effect between treatment 1 and treatment 2.

estimate

the estimated treatment effect difference between treatment 1 and treatment 2.

stderr

the standard error of the mean (difference), used as denominator in the t-statistic formula.

method

a character string indicating what type of test was performed.

data.name

a character string giving the name(s) of the data.

References

Ma W, Hu F, Zhang L. Testing hypotheses of covariate-adaptive randomized clinical trials[J]. Journal of the American Statistical Association, 2015, 110(510): 669-680.

Examples

##generate data
set.seed(100)
n = 1000
cov_num = 5
level_num = c(2,2,2,2,2)
pr = rep(0.5,10)
beta = c(0.1,0.4,0.3,0.2,0.5)
omega = c(0.1, 0.1, rep(0.8 / 5, times = 5))
mu1 = 0
mu2 = 0.7
sigma = 1
type = "linear"
p = 0.85

dataH = getData(n,cov_num,level_num,pr,type,beta,
                mu1,mu2,sigma,"HuHuCAR",omega,p)

#run the corrected t-test
HHct=corr.test(dataH)
HHct

[Package carat version 2.0.2 Index]