plot.modreg {dirttee} | R Documentation |
Plots smooth components of a fitted modreg object.
## S3 method for class 'modreg'
plot(x, ...)
x |
The object to plot, must be of class modreg. |
... |
Additional arguments to pass to |
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
.
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.
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)