Description Usage Arguments Examples
Calculate sample size required to meet minimial detectable effect given standard deviation of the predictor, multiple correlation, power, false positive rate, and variance of the outcome.
1 2 | compute_sample_size(method_name, beta, sigma_x, mult_cor, power = 0.8,
fpr = 0.05, ...)
|
method_name |
Name of GLM intended to be used. Function accepts: 'linear regression', 'logistic regression', 'cox regression', or 'poisson regression' |
beta |
Smallest effect to detect |
sigma_x |
Standard deviation of the predictor to which beta applies |
mult_cor |
Multiple correlation with other covariates |
power |
Desired statistical power, must be between 0 and 1 (default 0.8) |
fpr |
False positive rate, must bebetween 0 and 1 (Default 0.05) |
... |
arguments to variance function |
1 2 3 4 | samplesize(method_name='linear regression', 1,1,0,var_y=1)
samplesize(method_name='logistic regression', 1,1,0,p=0.5)
samplesize(method_name='cox regression', 1,1,0,prob_uncens=0.75)
samplesize(method_name='poisson regression', 1,1,0,disp=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.