plot.lsm: Graphics Method for 'lsm' Objects

View source: R/lsmplot.lsm.R

plot.lsmR Documentation

Graphics Method for lsm Objects

Description

Obtains graphics from a fitted lsm object.

Usage

## S3 method for class 'lsm'
plot(
  x,
  type = c("scatter", "probability", "Logit", "odds"),
  title = NULL,
  xlab = NULL,
  ylab = NULL,
  color = "red",
  size = 1.5,
  shape = 19,
  ...
)

Arguments

x

The LSM model object.

type

The type of plot to draw. Options are "scatter" for a scatter plot, "probability" for a probability plot, "Logit" for a plot related to logistic regression, and "odds" for a plot related to odds.

title

The title of the plot.

xlab

The label for the x-axis.

ylab

The label for the y-axis.

color

The color of the dots in the plot.

size

The size of the dots in the plot.

shape

The shape oof the dots in the plot.

...

Additional graphical arguments to be passed to ggplot.

Details

Gráfico de regresión logística

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

Value

Un objeto ggplot. following components:

Author(s)

Jorge Villalba Acevedo [cre, aut], (Universidad Tecnológica de Bolívar, Cartagena-Colombia).

References

[1] LLinás, H. J. (2006). Precisiones en la teoría de los modelos logísticos. Revista Colombiana de Estadística, 29(2), 239–265. https://revistas.unal.edu.co/index.php/estad/article/view/29310

[2] Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013). Applied Logistic Regression, 3rd ed., New York: Wiley.

[3] Chambers, J. M. and Hastie, T. J. (1992). Statistical Models in S. Wadsworth & Brooks/Cole.

Examples

#library(lsm)

#1. AGE and Coronary Heart Disease (CHD) Status of 100 subjects:

# library(lsm)
# library(tidyverse)
# datos <- lsm::chdage
# attach(datos)
# modelo <- lsm(CHD ~ AGE, data=datos)
# plot(modelo, type = "scatter")
# plot(modelo, type = "scatter", title  = "Villalba-llinas lsm")
# plot(modelo, type = "probability", xlab = "Elainys")
# plot(modelo, type = "Logit", color = "blue")
# plot(modelo, type = "odds", size = 3)


lsm documentation built on June 22, 2024, 10:31 a.m.