gldrmCI | R Documentation |
Calculates a Wald, likelihood ratio, or score confidence interval for a single gldrm coefficient. Also calculates upper or lower confidence bounds. Wald confidence intervals and bounds are calculated from the standard errors which are available from the gldrm model fit. For likelihood ratio and score intervals and bounds, a bisection search method is used, which takes longer to run.
gldrmCI(
gldrmFit,
term,
test = c("Wald", "LRT", "Score"),
level = 0.95,
type = c("2-sided", "lb", "ub"),
eps = 1e-10,
maxiter = 100
)
gldrmFit |
A gldrm model fit. Must be an S3 object of class "gldrm",
returned from the |
term |
Character string containing the name of the coefficient of interest. The coefficient names are the names of the beta component of the fitted model object. They can also be obtained from the printed model output. Usually the names match the formula syntax, but can be more complicated for categorical variables and interaction terms. |
test |
Character string for the type confidence interval. Options are "Wald", "LRT" (for likelihood ratio), and "Score". |
level |
Confidence level of the interval. Should be between zero and one. |
type |
Character string containing "2-sided" for a two-sided confidence interval, "lb" for a lower bound, or "ub" for an upper bound. |
eps |
Convergence threshold. Only applies for
|
maxiter |
The maximum number of bisection method iterations for likelihood
ratio intervals or bounds. For two-sided intervals, |
An S3 object of class 'gldrmCI', which is a list of the following items.
term
Coefficient name.
test
Type of interval or bound - Wald or likelihood ratio.
level
Confidence level.
type
Type of interval or bound - two-sided, upper bound, or lower
bound.
cilo
/cihi
Upper and lower interval bounds. One one of the
two applies for confidence bounds.
iterlo
/iterhi
Number of bisection iterations used. Only
applies for likelihood ratio intervals and bounds.
pvallo
/pvalhi
For likelihood ratio intervals and bounds,
the p-value at convergence is reported.
conv
Indicator for whether the confidence interval limit or bound
converged.
data(iris, package="datasets")
### Fit gldrm with all variables
fit <- gldrm(Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width + Species,
data=iris, link="log")
### Wald 95% confidence interval for Sepal.Width
ci <- gldrmCI(fit, "Sepal.Width", test="Wald", level=.95, type="2-sided")
ci
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.