propdiff_ac | R Documentation |
propdiff_ac
Calculates the difference between proportions
and standard error according to method Agresti-Caffo.
propdiff_ac(y, x, formula, data)
y |
0-1 binary response variable. |
x |
0-1 binary independent variable. |
formula |
A formula object to specify the model as normally used by glm. |
data |
An objects of class |
As output the differences between proportions according to
Agresti-Caffo and Wald are provided. The Agresti-Caffo difference is
used in the function pool_propdiff_ac
to derive the Agresti-Caffo
confidence intervals. For the pooled difference between proportions
the difference between proportions according to Wald are used.
The difference between proportions, the standard error according to Agresti-Caffo and complete data degrees of freedom (dfcom) as n-1.
Martijn Heymans, 2021
Agresti, A. and Caffo, B. Simple and Effective Confidence Intervals for Proportions and Differences of Proportions Result from Adding Two Successes and Two Failures. The American Statistician. 2000;54:280-288.
Fagerland MW, Lydersen S, Laake P. Recommended confidence intervals for two independent binomial proportions. Stat Methods Med Res. 2015 Apr;24(2):224-54.
with.milist
, pool_propdiff_ac
imp_dat <- df2milist(lbpmilr, impvar="Impnr") ra <- with(imp_dat, expr=propdiff_ac(Chronic ~ Radiation)) # same as ra <- with(imp_dat, expr=propdiff_ac(y=Chronic, x=Radiation))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.