plot.spe: Plot output of 'spe' command. The x-axis limits are set to...

View source: R/spe.R

plot.speR Documentation

Plot output of spe command. The x-axis limits are set to the specified range of percentile index.

Description

Plot output of spe command. The x-axis limits are set to the specified range of percentile index.

Usage

## S3 method for class 'spe'
plot(
  x,
  ylim = NULL,
  main = NULL,
  sub = NULL,
  xlab = "Percentile Index",
  ylab = "Sorted Effects",
  ...
)

Arguments

x

Output of spe command.

ylim

y-axis limits. Default is NULL.

main

Main title of the plot. Defualt is NULL.

sub

Sub title of the plot. Default is NULL.

xlab

x-axis label. Default is "Percentile Index".

ylab

y-axis label. Default is "Sorted Effects".

...

graphics parameters to be passed to the plotting routines.

Examples

data("mortgage")
fm <- deny ~ black + p_irat + hse_inc + ccred + mcred + pubrec + ltv_med +
ltv_high + denpmi + selfemp + single + hischl
test <- spe(fm = fm, data = mortgage, var = "black", method = "logit",
us = c(2:98)/100, b = 50)

plot(x = test, main="APE and SPE of Being Black on the prob of
Mortgage Denial", sub="Logit Model", ylab="Change in Probability")


SortedEffects documentation built on March 22, 2022, 9:05 a.m.