Description Usage Arguments Value Examples
Gives sample size necessary to demonstrate that
coefficient in model for given predictor is equal to its
given value (rather than equal to zero) for a given level
of power and significance.
Also number of events
(smaller of outcome y=0 and outcome y=1) per
predictor.
Uses different methods depending on
whether model has one binomial, one continuous or
multiple predictors.
1 |
x |
A logistic regression model of class |
alpha |
significance level α for null-hypothesis significance test |
beta |
power β for null-hypothesis significance test |
coeff |
Name of predictor (coefficient) in model to be tested |
A list of:
res |
Result: Sample size required to show coefficient for predictor is as given in the model rather than 0 |
epc |
Events per covariate; should be >10 to make meaningful statements about coefficients obtained |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | set.seed(1)
### one coefficient, which is binomial
f1 <- genLogiDf(b=1, c=0, n=50)$model
logiSS(f1)
###
### one coefficient, which is continuous
f1 <- genLogiDf(f=0, b=0, c=1, n=50)$model
logiSS(f1, coeff="x1")
###
### binomial coefficient
f1 <- genLogiDf(f=0, b=1, c=1, n=50)$model
logiSS(f1, coeff="x1")
###
### continuous coefficient
f1 <- genLogiDf(f=0, b=1, c=1, n=50)$model
logiSS(f1, coeff="x2")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.