Description Usage Arguments Details Value References See Also Examples
Derive an approximate gamma distribution confidence interval
using stats::qchisq()
.
1 | get_ci_gamma(interval, estimate, weights, variance, method = "tcz06")
|
interval |
A scalar between 0 and 1, indicating the width of the
interval. For example, use |
estimate |
A numeric vector containing the point estimates. |
weights |
A list of numeric vectors where each vector contains the weights of each strata in the directly standardized rate calculation. |
variance |
A numeric vector containing the variances. |
method |
A string to indicate which method to use to calculate the
confidence interval. The default is |
This function assumes that the values of the input arguments
estimate
, weights
, and variance
are aligned and that they are the same
length.
This function is used to construct confidence intervals in get_ds_rt()
.
A data frame with columns lower
and upper
, which contain the lower
and upper limits of a confidence interval, respectively.
get_ci_norm()
, get_ci_lnorm()
, get_ci_pois()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
# calculate a single confidence interval
e_1 <- 0.015
w_1 <- c(
3.7e-05, 2.2e-05, 2.0e-05, 1.2e-05, 2.3e-05,
7.0e-05, 3.8e-05, 6.0e-05, 1.7e-05, 2.6e-05
)
v_1 <- 1e-06
get_ci_gamma(interval = 0.95, estimate = e_1, weights = list(w_1), variance = v_1)
get_ci_gamma(interval = 0.9, estimate = e_1, weights = list(w_1), variance = v_1, method = "ff97")
# calculate confidence intervals around multiple estimates
e_2 <- 0.004
w_2 <- c(
3.4e-06, 2.0e-06, 1.8e-06, 1.1e-06, 2.1e-06,
6.3e-06, 3.5e-06, 5.4e-06, 1.5e-06, 2.3e-06
)
v_2 <- 1e-08
get_ci_gamma(
interval = 0.9, estimate = c(e_1, e_2),
weights = list(w_1, w_2), variance = c(v_1, v_2)
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.