plotUncertainty_slim: plotUncertainty_slim : Get spline uncertainty

plotUncertainty_slimR Documentation

plotUncertainty_slim : Get spline uncertainty

Description

This function is a "slim" version of the 'gdm::plotUncertainty' function.

Usage

plotUncertainty_slim(
  spTable,
  sampleSites,
  bsIters,
  geo = FALSE,
  splines = NULL,
  knots = NULL,
  splineCol = "blue",
  errCol = "grey80",
  plot.linewidth = 2,
  plot.layout = c(2, 2),
  parallel = FALSE,
  cores = 2,
  save = FALSE,
  fileName = "gdm.plotUncertainy.csv"
)

Arguments

spTable

see 'gdm::plotUncertainty' function description

sampleSites

see 'gdm::plotUncertainty' function description. 0.3 was used in Gossner 2016.

bsIters

see 'gdm::plotUncertainty' function description. 100 were used in Gossner 2016.

geo

is set to FALSE by default, see 'gdm::plotUncertainty' function description

splines

is set to NULL by default, see 'gdm::plotUncertainty' function description

knots

is set to NULL by default, see 'gdm::plotUncertainty' function description

parallel

is set to FALSE by default, see 'gdm::plotUncertainty' function description

cores

is set to 2 by default, see 'gdm::plotUncertainty' function description

Details

Two changes have been applied to the function : (1) The plotting has been disabled, because the function is runned on a cluster and no plotting output is desired (or can later be done based on the extracted) values. Additionally, the number of points for predictions is enhanced from 200 to 8350 points (the number of observations in the dataset). Note that this change is hard-coded, and is also changed in the function 'isplineExtract.edit' (2) The saving option is edited, such that the output of the function is returned to a variable rather than saved as .csv. This is more appropriate in the cluster surrounding.

All parameters are the same as in the original function, but a few of them are deprecated : unneeded plotting variables are : 'splineCol', 'errCol', 'plot.linewidth', 'plot.layout' unneeded saving variables are : 'save', 'fileName' Please consult the original description of the function by the 'gdm' package authors, because this is really just a simple edit.

Value

a data.frame containing "6 values for each predictor, three each for the x and y values. For each x and y, there are the full model values, the upper and the lower bound." (taken from the original 'gdm::plotUncertainty' function description)

Examples

# read in gdminput from `results_nonpublic.R`.
test <- plotUncertainty_slim(gdminput, sampleSites = 0.3, bsIters = 5, geo = T)


allanecology/multiFunBetadivLuiGDM documentation built on Nov. 12, 2023, 6:16 a.m.