invertci | R Documentation |
This function constructs the confidence interval using the bisection method.
invertci(
f,
farg = list(),
alpha = 0.05,
init.lb = NULL,
init.ub = NULL,
tol = 1e-04,
max.iter = 20,
pvals = NULL,
dp = 5,
progress = TRUE
)
f |
The function that represents a testing procedure. |
farg |
The list of arguments to be passed to the function of testing procedure. |
alpha |
The significance level(s). This can be a vector. |
init.lb |
The initial brackets to search for the lower bound. This is
not required if the |
init.ub |
The initial brackets to search for the upper bound. This is
not required if the |
tol |
The tolerance level in the bisection method. |
max.iter |
The maximum number of iterations in the bisection method. |
pvals |
The data frame that consists the points and the corresponding
|
dp |
The number of decimal places in the output. |
progress |
The boolean variable for whether the result messages should
be displayed in the procedure of constructing confidence interval. If
it is set as |
The number of decimal places displayed in the messages (if
progress
is set as TRUE
) is equal to the number of decimal
places in the variable tol
.
Returns the confidence interval and a data frame that contains the points being tested in the procedure.
pvals |
The data frame that consists of the points and the
corresponding |
df_ub |
The data frame storing the information for the bisection method in each iteration when evaluating the upper bound of the confidence interval. |
df_lb |
The data frame storing the information for the bisection method in each iteration when evaluating the lower bound of the confidence interval. |
alpha |
The significance levels. |
tol |
The tolerance level in the bisection method. |
iter |
The total number of iterations taken. |
call |
The matched call. |
para.name |
The name of the tuning parameters involved. |
para.vals |
The values of the tuning parameters involved. |
ci |
The confidence intervals constructed. |
source("./example/dgp_missingdata.R") # Change directory if necessary J <- 5 N <- 1000 data <- missingdata_draw(J = J, n = N, seed = 1, prob.obs = .5) lpm <- missingdata_lpm(J = J, info = "full", data = data) farg <- list(data = data, lpmodel = lpm, R = 100, phi = 2/3, solver = "gurobi", progress = FALSE) invertci(f = subsample, farg = farg, alpha = .05)
More examples can be found in the invertci_example.R
file
under the example
subdirectory of the installation directory for
the lpinfer
package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.