plot.modreg {dirttee}R Documentation

Plot regression terms for modreg objects

Description

Plots smooth components of a fitted modreg object.

Usage

## S3 method for class 'modreg'
plot(x, ...)

Arguments

x

The object to plot, must be of class modreg.

...

Additional arguments to pass to plot.gam.

Details

This function is a wrapper for plot.gam. It displays term plots of smoothed variables. Optionally produces term plots for parametric model components as well. Standard errors will not be displayed but can be estimated by boot_modreg.

Value

The functions main purpose is its side effect of generating plots. It also silently returns a list of the data used to produce the plots, which can be used to generate customized plots.

Examples


data(colcancer)
# mode regression with P-splines. Convergence criteria are changed to speed up the function
reg <- modreg(Surv(logfollowup, death) ~ sex + s(age, bs = "ps"), data = colcancer[1:70, ], 
control = modreg.control(tol_opt = 10^-2, tol_opt2 = 10^-2, tol = 10^-3))
plot(reg)



[Package dirttee version 1.0.2 Index]