Author: Mohsen Soltanifar
Date: 2024-03-15

# GenTwoArmsTrialSize

#### Mohsen Soltanifar

#### Chel Hee Lee

#### 2024-03-15

    library(GenTwoArmsTrialSize)

# Examples

- Example 1. Sample Size for two arms continuous end point clinical trial with noncompliance and expected loss of follow-up

    getSizeMean(design="parallel", test="equivalence", alpha=0.05,
                beta=0.20, sigma=0.10, k=1, delta=0.05, TTE=0.01,
                rho=c(0.05, 0.07), r=0.1)
    #>      n_trt n_ctl
    #> Size   113   113

- Example 2. Sample Size for two arms binary end point clinial trial with noncompliance and expected loss of follow-up

    getSizeProp(design="crossover", test="superiority", alpha=0.05,
                beta=0.20, varsigma=c(0.5, 0.5), k=1, seqnumber=2,
                delta=0.10, TTE=0, rho=c(0.05, 0.07), r=0.1)
    #>      n_trt n_ctl
    #> Size    86    86

- Example 3. Sample Size for two arms time to event point clinial trial with noncompliance and expected loss of follow-up

    getSizeTTE(design="parallel", test="equality", alpha=0.05, beta=0.20,
               varlambda=c(1,2), k=1, ttotal=3, taccrual=1,
               gamma=0.00001, delta=1, rho=c(0.05, 0.07), r=0.1)
    #> [1] 1.192941
    #> [1] 3.759987
    #>      n_trt n_ctl
    #> Size    56    56

- Example 4: Sample Size for two arms ordinal point clinial trial with noncompliance and expected loss of follow-up

    getSizeOrd(design="parallel", test="equality", alpha=0.05, beta=0.10,
               varcatprob= list(c(0.2,0.5,0.2,0.1),
                                c(0.378,0.472,0.106,0.044)),
               k=1, theta=0.877, delta=0, rho=c(0.05, 0.07), r=0.1)
    #>      n_trt n_ctl
    #> Size   138   138

# References

Chow, Shein-Chung, Jun Shao, Hansheng Wang, and Yuliya Lokhnygina. 2018. Sample Size Calculations in Clinical Research. Third edition. Chapman & Hall/CRC Biostatistics Series. Boca Raton: CRC Press, Taylor & Francis Group.
Julious, Steven A. 2023. Sample Sizes for Clinical Trials. Second edition. Boca Raton, FL: CRC Press.
Lachin, John M., and Mary A. Foulkes. 1986. “Evaluation of Sample Size and Power for Analyses of Survival with Allowance for Nonuniform Patient Entry, Losses to Follow-up, Noncompliance, and Stratification.” Biometrics 42 (3): 507–19.
Sato, Tosiya. 2000. “Sample Size Calculations with Compliance Information.” Statistics in Medicine 19 (19): 2689–97.
Whitehead, John. 1993. “Sample Size Calculations for Ordered Categorical Data.” Statistics in Medicine 12 (24): 2257–71.
Wittes, Janet. 2002. “Sample Size Calculations for Randomized Controlled Trials.” Epidemiologic Reviews 24 (1): 39–53.