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

prplot

Probability Plots for Categorical Data Analysis


Description

Plots the fitted probabilities for some very simplified special cases of categorical data analysis models.

Usage

prplot(object, control = prplot.control(...), ...)

prplot.control(xlab = NULL, ylab = "Probability", main = NULL, xlim = NULL,
    ylim = NULL, lty = par()$lty, col = par()$col, rcol = par()$col,
    lwd = par()$lwd, rlwd = par()$lwd, las = par()$las, rug.arg = FALSE, ...)

Arguments

object

Currently only an cumulative object. This includes a propodds object since that VGAM family function is a special case of cumulative.

control

List containing some basic graphical parameters.

xlab, ylab, main, xlim, ylim, lty

See par and ... below.

col, rcol, lwd, rlwd, las, rug.arg

See par and ... below. Arguments starting with r refer to the rug. Argument rug.arg is logical: add a rug for the distinct values of the explanatory variable?

...

Arguments such as xlab which are fed into prplot.control(). Only a small selection of graphical arguments from par are offered.

Details

For models involving one term in the RHS of the formula this function plots the fitted probabilities against the single explanatory variable.

Value

The object is returned invisibly with the preplot slot assigned. This is obtained by a call to plotvgam().

Note

This function is rudimentary.

See Also

Examples

pneumo <- transform(pneumo, let = log(exposure.time))
fit <- vglm(cbind(normal, mild, severe) ~ let, propodds, data = pneumo)
M <- npred(fit)  # Or fit@misc$M
## Not run:  prplot(fit)
prplot(fit, lty = 1:M, col = (1:M)+2, rug = TRUE, las = 1,
       ylim = c(0, 1), rlwd = 2) 
## End(Not run)

VGAM

Vector Generalized Linear and Additive Models

v1.1-5
GPL-3
Authors
Thomas Yee [aut, cre], Cleve Moler [ctb] (author of several LINPACK routines)
Initial release
2021-01-13

We don't support your browser anymore

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