View source: R/interval_estimate2.R
interval_estimate2 | R Documentation |
mu1-mu2
of two normal samples
Compute the two sided interval estimation of mu1-mu2
of two normal samples when the population variances are known, unknown equal, or unknown unequal.
interval_estimate2(x, y, sigma = c(-1, -1), var.equal = FALSE, alpha = 0.05)
x |
A numeric vector. |
y |
A numeric vector. |
sigma |
A numeric vector of length 2, which contains the standard deviations of two populations. When the standard deviations are known, input it, then the function computes the interval endpoints using normal population; when the standard deviations are unknown, ignore it, now we need to consider whether the two populations have equal variances. See |
var.equal |
A logical variable indicating whether to treat the two variances as being equal. If |
alpha |
The significance level, a real number in [0, 1]. Default to 0.05. 1-alpha is the degree of confidence. |
A data.frame with variables:
mean |
The difference of sample means xb-yb. |
df |
The degree of freedom. |
a |
The confidence lower limit. |
b |
The confidence upper limit. |
Ying-Ying Zhang (Robert) robertzhangyying@qq.com
Zhang, Y. Y., Wei, Y. (2013), One and two samples using only an R funtion, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2991/asshm-13.2013.29")}.
x=rnorm(10, mean = 1, sd = 0.2); x
y=rnorm(20, mean = 2, sd = 0.3); y
interval_estimate2(x, y, sigma = c(0.2, 0.3))
interval_estimate2(x, y, var.equal = TRUE)
interval_estimate2(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.