Skip to contents

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 class 'effect_plot_failure'
print(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

Value

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

Invisibly returns x.