Skip to contents

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.

Examples

df <- head(RP, 3)
slist <- check_lm_suitability(df, verbose = FALSE, nw = 1)
plot_lm_suitability(slist, descs = 1:5)
#> 2024-08-18 12:17:19.64 Plotting suitability of predictors for linear models to file '/tmp/RtmpYdhVel/lm_suitability2175bdf862d.pdf'
#> 2024-08-18 12:17:19.67 [1/5] nSmallRings (PLOTTED SUCCESSFULLY)
#> 2024-08-18 12:17:19.67 [2/5] nAromRings (PLOTTED SUCCESSFULLY)
#> 2024-08-18 12:17:19.67 [3/5] nRingBlocks (PLOTTED SUCCESSFULLY)
#> 2024-08-18 12:17:19.68 [4/5] nAromBlocks (PLOTTED SUCCESSFULLY)
#> 2024-08-18 12:17:19.68 [5/5] nRings3 (PLOTTED SUCCESSFULLY)