Evaluates confidence interval using
zero_hit()
,
theta_hit()
,
len()
,
and
shape()
.
ci_eval(ci, thetahat, theta = 0, label = NULL)
ci | Vector. Confidence intervals sorted from smallest to largest. The length should be even. The first and the last element correspond to the widest confidence interval. The second and the second to the last element correspond to the second widest confidence interval. And so on and so forth. |
---|---|
thetahat | Numeric. Parameter estimate \( \left( \hat{ \theta } \right) \). |
theta | Numeric. Population parameter \( \left( \theta \right) \). |
label | Vector.
Vector used to label results.
If not provided defaults to |
Returns a vector with the following elements:
Logical. Tests if confidence interval contains zero.
Logical. Tests if confidence interval contains theta.
Length of confidence interval.
Shape of confidence interval.
ci <- c( 98.04786, 98.38773, 98.68060, 100.5447, 100.8375, 101.1774 ) thetahat <- 99.6126336 theta <- 100 label <- c( 0.001, 0.01, 0.05 ) ci_eval( ci = ci, thetahat = thetahat, theta = theta, label = label )#> zero_hit_0.001 zero_hit_0.01 zero_hit_0.05 theta_hit_0.001 theta_hit_0.01 #> 0.0000000 0.0000000 0.0000000 1.0000000 1.0000000 #> theta_hit_0.05 length_0.001 length_0.01 length_0.05 shape_0.001 #> 1.0000000 3.1295400 2.4497700 1.8641000 0.9999954 #> shape_0.01 shape_0.05 #> 0.9999696 1.0000352