Learn R Programming

SelectBoost.gamlss (version 0.2.2)

effect_plot: One-variable effect plot from an sb_gamlss (or gamlss) fit

Description

Varies one variable and holds others at typical values (median/mode) to plot the predicted parameter curve (default: mu). Uses ggplot2 if available, otherwise base.

Usage

effect_plot(fit, var, data, what = "mu", grid = 100)

# S3 method for effect_plot_failure print(x, ...)

Value

a ggplot object if ggplot2 present; otherwise draws base plot and returns NULL

Invisibly returns x.

Arguments

fit

sb_gamlss object (or gamlss)

var

character, name of the variable to vary

data

original data.frame used to fit

what

which parameter to predict ("mu","sigma","nu","tau")

grid

number of grid points for numeric variable

x

object returned by effect_plot() when prediction fails

...

unused