Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

blr_segment_dist

Response distribution


Description

Distribution of response variable by segements/levels of a qualitative variable.

Usage

blr_segment_dist(data, response, predictor)

## S3 method for class 'blr_segment_dist'
plot(
  x,
  title = NA,
  xaxis_title = "Levels",
  yaxis_title = "Sample Distribution",
  sec_yaxis_title = "1s Distribution",
  bar_color = "blue",
  line_color = "red",
  print_plot = TRUE,
  ...
)

Arguments

data

A tibble or a data.frame.

response

Response variable; column in data.

predictor

Predictor variable; column in data.

x

An object of class blr_segment_dist.

title

Plot title.

xaxis_title

X axis title.

yaxis_title

Y axis title.

sec_yaxis_title

Secondary y axis title.

bar_color

Bar color.

line_color

Line color.

print_plot

logical; if TRUE, prints the plot else returns a plot object.

...

Other inputs.

Value

A tibble.

See Also

Other bivariate analysis procedures: blr_bivariate_analysis(), blr_segment_twoway(), blr_segment(), blr_woe_iv_stats(), blr_woe_iv()

Examples

k <- blr_segment_dist(hsb2, honcomp, prog)
k

# plot
plot(k)

blorr

Tools for Developing Binary Logistic Regression Models

v0.3.0
MIT + file LICENSE
Authors
Aravind Hebbali [aut, cre] (<https://orcid.org/0000-0001-9220-9669>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.