plot_lm_suitability: Plot the suitability of predictors for linear models

View source: R/prepro.R

plot_lm_suitabilityR Documentation

Plot the suitability of predictors for linear models

Description

This function creates one pdf page for every predictor inside slist$X. The pdf page consists of the following three plots shown next to each other:

  1. Histogram

  2. Density plot

  3. Scatterplot against slist$df$RT The name of the predictor, its suitability, and the status of the checks for missing values, near-zero variance, and outliers are shown in the title of each plot.

Usage

plot_lm_suitability(
  slist = check_lm_suitability(),
  pdfpath = tempfile("lm_suitability", fileext = ".pdf"),
  descs = NULL
)

Arguments

slist

A list containing the data frame df, the matrix X, and the data frame V from check_lm_suitability().

pdfpath

The path to the pdf file to save the plots.

descs

Index of chemical descriptors to plot. Leave at NULL to plot all chemical descriptors.

Value

No return value. The function is used for its side effect of creating a pdf file with the plots.

See Also

check_lm_suitability()

Examples

df <- head(RP, 3)
slist <- check_lm_suitability(df, verbose = FALSE, nw = 1)
plot_lm_suitability(slist, descs = 1:5)

FastRet documentation built on June 25, 2024, 5:07 p.m.