sdwdnsp2: Simulation of homoscedastic data with different...

sdwdnsp2R Documentation

Simulation of homoscedastic data with different non-selectivity profiles defined by the second setting

Description

Simulation of data with different selectivity profiles defined by second setting. To be used in simulations. Setting either simulation parameters to 'r' will invoke random generation of these numbers. Note that specifying parameters both outside and inside of parameter_row will make those parameters outside being overridden.

Usage

sdwdnsp2(
  n = "r",
  R = "r",
  cv_vec = "r",
  ci = "r",
  mmax = 2.5,
  q = c(0, 0.25),
  parameter_row = c(1),
  include_relocated = FALSE
)

Arguments

n

Integer or 'r' - number of unique samples

R

Integer or 'r' - number of unique replicated measurements of each sample

cv_vec

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

ci

vector with two elements or 'r' - Concentration interval

mmax

A number signifying the maximum multiple of relocation of clinical samples affected by differences in selectivity

q

A vector with two elements signifying the lower and upper quantile boundaries where clinical samples are relocated

parameter_row

A data frame or data table with only 1 row. Should contain a subset of simulation parameters. Parameters that may be included are n, R, cvx, cvy, ci_lwr, ci_upr, mmax, qmin and qmax

include_relocated

Should an additional column be attached that signify which CSs that were relocated? Default is FALSE

Details

Combine with lapply() or sapply() to simulate more than one data table. For parallel computing use mc_sdwdnsp2(). This function should only be used by advanced users. It is not user friendly for those not familiar with R

Value

A data table with 4 columns, two of which are measurement results from two MSs in comparison having differences in selectivity profiles defined by second setting. In addition, n * R rows

Examples

sdwdnsp2()

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