- x
A fitted lgspline model object containing the model fit to be plotted
- show_formulas
Logical; whether to display analytical formulas for each partition.
Default FALSE
- digits
Integer; Number of decimal places for coefficient display in formulas.
Default 4
- legend_pos
Character; Position of legend for 1D plots ("top", "bottom", "left",
"right", "topleft", etc.). Default "topright"
- custom_response_lab
Character; Label for response variable axis. Default "y"
- custom_predictor_lab
Character; Label for predictor axis in 1D plots. If NULL
(default), uses predictor column name
- custom_predictor_lab1
Character; Label for first predictor axis (x1) in 2D plots.
If NULL (default), uses first predictor column name
- custom_predictor_lab2
Character; Label for second predictor axis (x2) in 2D plots.
If NULL (default), uses second predictor column name
- custom_formula_lab
Character; Label for fitted response on link function scale.
If NULL (default), uses "link(E[custom_response_lab])" for non-Gaussian models
with non-identity link, otherwise uses custom_response_lab
- custom_title
Character; Main plot title. Default "Fitted Function"
- text_size_formula
Numeric; Text size for formula display. Passed to cex in legend()
for 1D plots and hover font size for 2D plots. If NULL (default), uses 0.8 for 1D
and 8 for 2D
- legend_args
List; Additional arguments passed to legend() for 1D plots
- new_predictors
Matrix; Optional new predictor values for prediction. If NULL
(default), uses original fitting data
- xlim
Numeric vector; Optional x-axis limits for 1D plots. Default NULL
- ylim
Numeric vector; Optional y-axis limits for 1D plots. Default NULL
- color_function
Function; Returns colors for plotting by partition, must return K+1 vector of valid colors. Defaults to NULL, in which case grDevices::rainbow(K+1)
is used for 1D and grDevices::colorRampPalette(RColorBrewer::brewer.pal(8, "Spectral"))(K+1)
used in multiple.
- add
Logical; If TRUE, adds to existing plot (1D only). Similar to add in
hist
. Default FALSE
- vars
Numeric or character vector; Optional indices for selecting variables to plot. Can either be numeric (the column indices of "predictors" or "data") or character (the column names, if available from "predictors" or "data")
- ...
Additional arguments passed to underlying plot functions: