gam_plot {BioPred}R Documentation

GAM Plot

Description

Generates a generalized additive model (GAM) plot for exploring the relationship between a response variable and a biomarker.

Usage

gam_plot(
  yvar,
  censorvar = NULL,
  xvar,
  xvars.adj = NULL,
  sxvars.adj = NULL,
  type,
  data,
  k,
  pred.type = "iterms",
  link.scale = TRUE,
  title = "Trend Plot",
  ybreaks = NULL,
  xbreaks = NULL,
  rugcol.var = NULL,
  add.points = FALSE,
  prt.sum = TRUE,
  prt.chk = FALSE,
  outlier.rm = FALSE,
  newdat = NULL
)

Arguments

yvar

Response variable name.

censorvar

Censoring variable name for survival analysis (0-censored, 1-event).

xvar

Biomarker name.

xvars.adj

Potential confounding variables to adjust for using linear terms.

sxvars.adj

Potential confounding variables to adjust for using curve terms.

type

"c" for continuous, "s" for survival, and "b" for binary response.

data

The dataset containing the variables.

k

Upper limit on the degrees of freedom associated with an s smooth.

pred.type

"iterms" for trend of xvar, "response" for Y at the original scale.

link.scale

Whether to show the plot in the scale of the link function.

title

Title of the plot.

ybreaks

Breaks on the y-axis.

xbreaks

Breaks on the x-axis.

rugcol.var

Variable name defining the color of the rug and points.

add.points

Whether to add data points to the plot.

prt.sum

Whether to print summary or not.

prt.chk

Whether to print model diagnosis.

outlier.rm

Whether to remove outliers based on 1.5IQR.

newdat

User-supplied customized data for prediction and plotting.

Value

A list containing p-table, s-table, GAM summary, GAM check, and the plot.


[Package BioPred version 1.0.1 Index]