View source: R/confIntSquareAdd.R
confIntSquareAdd | R Documentation |
This function computes the confidence interval for the difference between two point estimates using the square-and-add method.
confIntSquareAdd(theta1, lower1, upper1, theta2, lower2, upper2)
theta1 |
Numeric value of the point estimate for group 1. |
lower1 |
Numeric value of the lower bound of the confidence interval for group 1. |
upper1 |
Numeric value of the upper bound of the confidence interval for group 1. |
theta2 |
Numeric value of the point estimate for group 2. |
lower2 |
Numeric value of the lower bound of the confidence interval for group 2. |
upper2 |
Numeric value of the upper bound of the confidence interval for group 2. |
The function returns a confidence interval of the same level as the confidence intervals for theta1 and theta2
A list with the entries:
difference: Estimated difference (group 1 - group 2).
CI: Lower and upper bound of the confidence interval for the difference.
Manuel Pfister, Leonhard Held, Charlotte Micheloud
Newcombe, R.G. (1998). Interval estimation for the difference between independent proportions: comparison of eleven methods, Statistics in Medicine, 17, 873–890.
Newcombe, R.G. (2013). Confidence Intervals for Proportions and Related Measures of Effect Size, CRC Press, 2nd Edition, Chapter 7.3.
ci1 <- wilson(x=11, n=12)
ci2 <- wilson(x=1, n=12)
confIntSquareAdd(theta1 = ci1[2], lower1=ci1[1], upper1=ci1[3],
theta2 = ci2[2], lower2=ci2[1], upper2=ci2[3])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.