sepplot: Generate a Separation Plot

Description Usage Arguments Details See Also Examples

View source: R/plot.spdur.R

Description

A separationplot wrapper for class “spdur”.

Usage

1
2
3
4
sepplot(x, pred_type = "conditional hazard", obs = NULL,
  endSpellOnly = FALSE, lwd1 = 5, lwd2 = 2, shuffle = TRUE,
  heading = "", show.expected = TRUE, newplot = FALSE, type = "line",
  ...)

Arguments

x

An object of class "spdur".

pred_type

Which statistic to plot, i.e. "conditional hazard" or "conditional risk".

obs

Variable that captures observed outcomes. If NULL (default), it is chosen based on pred_type: "fail" for (conditional) hazard, and "atrisk" for (conditional) risk.

endSpellOnly

Should only the last observation in each spell be kept? FALSE by default.

lwd1

See separationplot.

lwd2

See separationplot.

shuffle

See separationplot.

heading

See separationplot.

show.expected

See separationplot.

newplot

See separationplot

type

See separationplot.

...

Optional parameters passed to separationplot, e.g. type of statistic to calculate.

Details

Creates a separation plot of fitted values from split-duration model results using predict.spdur.

See Also

separationplot, predict.spdur

Examples

1
2
3
4
5
6
7
# get model estimates
library(separationplot)
data(model.coups)

# plot
p <- plot(model.coups)
p

spduration documentation built on May 1, 2019, 6:32 p.m.