sdwdnsp1: Simulation of homoscedastic data with different...

sdwdnsp1R Documentation

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

Description

Simulation of data with different selectivity profiles defined by first 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

sdwdnsp1(
  n = "r",
  R = "r",
  cv_vec = "r",
  ci = "r",
  mmax = 2.5,
  p = 0.05,
  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

p

A number signifying the average proportion of clinical samples being 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 and p

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_sdwdnsp1(). 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 the first setting. In addition, n * R rows

Examples

sdwdnsp1()

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