plot_logit: compstatslib plot_logit() function

View source: R/logit_plot.R

plot_logitR Documentation

compstatslib plot_logit() function

Description

Non-interactive visualization function that plots given points, logistic regression line and relevant statistics.

Usage

plot_logit(points, ...)

Arguments

points

A dataframe of *x* and *y* coordinates to plot.

formula

A formula to use in estimating logit (e.g., y ~ x).

regression

Logical parameter of whether to plot a regression line (TRUE by default)

stats

Logical parameter of whether to display relevant statistics on the plot area (TRUE by default). The following parameters are provided on the plot area:

  1. InterceptThe intercept of the logistic regression.

  2. CoefficientThe coefficient of the independent variable.

  3. AICAn information theoretic fit criterion.

Value

A dataframe containing the points coordinates.

See Also

interactive_regression

Examples

mydata <- data.frame(iv = c(-6, -3, 1, 3, 5, 8), dv = c(0, 0, 0, 1, 1 ,1))
plot_logit(mydata, formula = dv ~ iv)


soumyaray/compstatslib documentation built on March 11, 2023, 8:39 p.m.