Learn R Programming

glsm (version 0.0.0.6)

confint.glsm: Confidence Intervals for Coefficients in glsm Objects

Description

Calculates confidence intervals for the coefficients in a fitted glsm model. Includes exponentiated intervals (Odds Ratios) for easier interpretation.

Usage

# S3 method for glsm
confint(object, parm, level = 0.95, ...)

Value

An object of class "confint.glsm", which is a list containing:

object

a glsm object

parm

calculate confidence intervals for the coefficients.

level

confidence levels

Arguments

object

The type of prediction required. The default is on the scale of the linear predictors. The alternative response gives the predicted probabilities.

parm

calculate confidence intervals for the coefficients

level

It gives the desired confidence level for the confidence interval. For example, a default value is level = 0.95, which will generate a 95% confidence interval." The alternative response gives the predicted probabilities.

...

further arguments passed to or from other methods.

Author

Humberto Llinás (Universidad del Norte, Barranquilla-Colombia; author), Jorge Villalba (Universidad Tecnológica de Bolívar, Cartagena-Colombia; author and creator), Jorge Borja (Universidad del Norte, Barranquilla-Colombia; author and creator), Jorge Tilano (Universidad del Norte, Barranquilla-Colombia; author)

Details

Confint Method for 'glsm'

The saturated model is characterized by the assumptions 1 and 2 presented in section 2.3 by Llinas (2006, ISSN:2389-8976).

References

Hosmer, D., Lemeshow, S., & Sturdivant, R. (2013). Applied Logistic Regression (3rd ed.). New York: Wiley. ISBN: 978-0-470-58247-3 Llinás, H. (2006). Precisiones en la teoría de los modelos logísticos. Revista Colombiana de Estadística, 29(2), 239–265. Llinás, H., & Carreño, C. (2012). The Multinomial Logistic Model for the Case in Which the Response Variable Can Assume One of Three Levels and Related Models. Revista Colombiana de Estadística, 35(1), 131–138. Orozco, E., Llinás, H., & Fonseca, J. (2020). Convergence theorems in multinomial saturated and logistic models. Revista Colombiana de Estadística, 43(2), 211–231. Llinás, H., Arteta, M., & Tilano, J. (2016). El modelo de regresión logística para el caso en que la variable de respuesta puede asumir uno de tres niveles: estimaciones, pruebas de hipótesis y selección de modelos. Revista de Matemática: Teoría y Aplicaciones, 23(1), 173–197.

Examples

Run this code
# Load the glsm package and example dataset
library(glsm)
data("hsbdemo", package = "glsm")

# Fit a multinomial logistic regression model using glsm()
model <- glsm(prog ~ ses + gender, data = hsbdemo)

# Get confidence intervals for all model coefficients (default 95% level)
confint(model)

# Get confidence intervals for a specific coefficient
params <- names(model$coefficients)

results <- lapply(params, function(p) {
  cat("\nConfidence interval for:", p, "\n")
  print(confint(model, parm = p, level = 0.95))
})

Run the code above in your browser using DataLab