# powerCal: Calculate the power for testing delta=0 In riskPredictClustData: Assessing Risk Predictions for Clustered Data

## Description

Calculate the power for testing delta=0.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12``` ```powerCal( nSubj, mu1, triangle, rho, rho11, rho22, rho12, p11, p10, p01, alpha = 0.05) ```

## Arguments

 `nSubj` integer. number of subjects to be generated. Assume each subject has two observations. `mu1` mu_1=H(Y)-H(Y_c) is the difference between probit transformation H(Y) and probit-shift alternative H(Y_c), where Y is the prediction score of a randomly selected progressing subunit, and Y_c is the counterfactual random variable obtained if each subunit that had progressed actually had not progressed. `triangle` the difference of the expected value the the extended Mann-Whitney U statistics between two prediction rules, i.e., triangle = eta^{(1)}_c - eta^{(2)}_c `rho` rho=corr(H(Z_{ij}), H(Z_{k ell})) , where H=Phi^{-1} is the probit transformation. `rho11` rho_{11}=corr(H_{ij}^{(1)}, H_{i ell}^{(1)}) , where H=Phi^{-1} is the probit transformation. `rho22` rho_{22}=corr(H_{ij}^{(2)}, H_{i ell}^{(2)}) , where H=Phi^{-1} is the probit transformation. `rho12` rho_{12}=corr(H_{ij}^{(1)}, H_{i ell}^{(2)}) , where H=Phi^{-1} is the probit transformation. `p11` p_{11}=Pr(delta_{i1}=1 & delta_{i2}=1) , where delta_{ij}=1 if the j-th subunit of the i-th cluster has progressed. `p10` p_{11}=Pr(delta_{i1}=1 & delta_{i2}=0) , where delta_{ij}=1 if the j-th subunit of the i-th cluster has progressed. `p01` p_{11}=Pr(delta_{i1}=0 & delta_{i2}=1) , where delta_{ij}=1 if the j-th subunit of the i-th cluster has progressed. `alpha` type I error rate

the power

## Author(s)

Bernard Rosner <stbar@channing.harvard.edu>, Weiliang Qiu <Weiliang.Qiu@gmail.com>, Meiling Ting Lee <MLTLEE@umd.edu>

## References

Rosner B, Qiu W, and Lee MLT. Assessing Discrimination of Risk Prediction Rules in a Clustered Data Setting. Lifetime Data Anal. 2013 Apr; 19(2): 242-256.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10``` ``` set.seed(1234567) mu1 = 0.8 power = powerCal(nSubj = 30, mu1 = mu1, triangle = 0.05, rho = 0.93, rho11 = 0.59, rho22 = 0.56, rho12 = 0.52, p11 = 0.115, p10 = 0.142, p01 = 0.130, alpha = 0.05) print(power) ```

riskPredictClustData documentation built on May 1, 2019, 6:34 p.m.