Title: | Sample Size Calculation for Propensity Score Analysis |
---|---|
Description: | Sample size calculations in causal inference with observational data are increasingly desired. This package is a tool to calculate sample size under prespecified power with minimal summary quantities needed. |
Authors: | Bo Liu [aut, cre], Xiaoxiao Zhou [ctb], Fan Li [ctb] |
Maintainer: | Bo Liu <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-02-15 05:40:27 UTC |
Source: | https://github.com/laubok/pspower |
Plots PSpower object
## S3 method for class 'PSpower' plot(x, power = seq(0.6, 0.99, length.out = 100), ...)
## S3 method for class 'PSpower' plot(x, power = seq(0.6, 0.99, length.out = 100), ...)
x |
PSpower object |
power |
a range of powers to plot the power curve |
... |
ignored |
obj <- PSpower(1, 0.05, 0.956, 0.5, 0.99, -1.74, -2.74, 19.86, 20.12, 0.14, 0.14) plot(obj)
obj <- PSpower(1, 0.05, 0.956, 0.5, 0.99, -1.74, -2.74, 19.86, 20.12, 0.14, 0.14) plot(obj)
Prints PSpower object
## S3 method for class 'PSpower' print(x, ...)
## S3 method for class 'PSpower' print(x, ...)
x |
PSpower object |
... |
ignored |
Calculate sample size needed to achieve a prespecified power
PSpower( tau, alpha, beta, r, phi, E1, E0, S1, S0, R1, R0, test = "two-sided", estimand = "ATE" )
PSpower( tau, alpha, beta, r, phi, E1, E0, S1, S0, R1, R0, test = "two-sided", estimand = "ATE" )
tau |
the estimated treatment effect $E[Y(1) - Y(0)]$ |
alpha |
the significance level |
beta |
the power to achieve |
r |
the proportion of treated units |
phi |
the overlap coefficients |
E1 , E0 , S1 , S0 , R1 , R0
|
the summary quantities |
test |
whether one-sided or two-sided test is considered |
estimand |
the estimand (ATE, ATT, ATC or ATO), or a customized tilting function |
an object with the calculated sample size
PSpower(1, 0.05, 0.956, 0.5, 0.99, -1.74, -2.74, 19.86, 20.12, 0.14, 0.14)
PSpower(1, 0.05, 0.956, 0.5, 0.99, -1.74, -2.74, 19.86, 20.12, 0.14, 0.14)