Generate a Separation Plot

Description

separationplot method for class “spdur”.

Usage

1
2
3
4
5
## S3 method for class 'spdur'
separationplot(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 separationplot of fitted values from split-duration model results using predict.spdur.

See Also

separationplot, predict.spdur

Examples

1
2
3
4
5
# get model estimates
data(model.coups)

# plot
p <- plot(model.coups)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.