logPlot: Graph an outcome variable that has been log transformed

View source: R/logPlot.R

logPlotR Documentation

Graph an outcome variable that has been log transformed

Description

Graph an outcome variable that has been log transformed

Usage

logPlot(
  xstart = 0,
  xincrement = 1,
  int = 0,
  b1 = 1,
  xlog = FALSE,
  ylog = TRUE,
  xmin,
  xmax,
  ymin = NULL,
  ymax = NULL,
  digits = 2
)

Arguments

xstart

starting value of x

xincrement

how much x increases

int

intercept

b1

slope

xlog

whether x is logged or not

ylog

whether y is logged or not

xmin

minimum of x axis

xmax

maximum of x axis

ymin

minimum of y axis

ymax

maximum of y axis

digits

number of digits to print

Examples

library(carData)
m <- lm(data = USArrests, log(Rape) ~ Assault)
texreg::screenreg(m, digits = 3)
int <- m$coefficients["(Intercept)"]
b1 <- m$coefficients["Assault"]
logPlot(xstart = 150, xincrement = 1, int = int, b1 = b1, ylog = TRUE, xmin = 148, xmax = 152)
logPlot(xstart = 148, xincrement = 1, int = int, b1 = b1, ylog = TRUE, xmin = 140, xmax = 152)
logPlot(xstart = 148, xincrement = 100, int = int, b1 = b1, ylog = TRUE, xmin = 0, xmax = 400)

prox9974/soc429Code documentation built on June 16, 2022, 3:41 a.m.