Plot an ensemble of trendlines based on slope and intercept.

plotTrendLinesEns(
  mb.df,
  x.range,
  index.xy = 1:nrow(mb.df),
  alp = 0.2,
  color = "red",
  add.to.plot = ggplot()
)

Arguments

mb.df

A data.frame of slopes (column 1) and intercepts (column 2)

x.range

range of x values (min and max)

index.xy

index of which observations to use

alp

Line transparency

color

color of the lines

add.to.plot

A ggplot object to add these lines to. Default is ggplot() .

Value

A ggplot object

Author

Nick McKay