mc_sdwinsp2: Simulate several data sets with identical non-selectivity...

mc_sdwinsp2R Documentation

Simulate several data sets with identical non-selectivity profiles using parallel computation

Description

Simulate several data sets with identical non-selectivity profiles using parallel computation

Usage

mc_sdwinsp2(
  parameter_row = c(1),
  m = 100,
  n = "r",
  R = "r",
  cv_vec = "r",
  ci = "r",
  xi0 = 1,
  xi = 2,
  parallel = FALSE,
  progress_bar = TRUE
)

Arguments

parameter_row

A data frame or data table with only 1 row. Should contain a subset of simulation parameters. Possible simulation parameters are n, R, cvx, cvy, ci_lwr and ci_upr, xi0, xi

m

Integer - The number of data sets to be simulated

n

Integer or 'r' - number of unique samples

R

Integer or 'r' - Number of unique replicated measurements on each sample

cv_vec

Vector with two elements or 'r' - MS CVs in decimal

ci

Vector with two elements or 'r' - Concentration interval

xi0

A number signifying the relative starting value to the base. Default is 1 and should be smaller than xi

xi

A number signifying the relative ending value relative to the base. Default is 2 and should be larger than xi0

parallel

Logical - Should computations be performed in parallel or not. Default is FALSE and is not recommended unless m > 1e5

progress_bar

Logical - Should a progress bar tracking the progress of the simulations be displayed? Default is TRUE

Details

Simulates m data sets with identical selectivity profiles, but with heteroscedasticity. The ratio of parameters xi and xi0 indicates the relative increase of standard deviation of measurement errors from the lower end of the concentration range to the upper.

Value

A list containing m simulated data tables with 4 columns, two of which are measured results from two MSs in comparison. In addition, n * R rows.

Examples

mc_sdwinsp2(m = 50, xi0 = 1, xi = 3)

pernille267/commutability.selectivity documentation built on July 20, 2022, 9:11 a.m.