norm_lin_dataset_sim: Generate simulated observations following a linear model with...

Description Usage Arguments Value See Also Examples

View source: R/simulation.R

Description

Generate simulated observations following a linear model with normal random error.

Usage

1
2
norm_lin_dataset_sim(MyDOE, intercept = 0, slope = 1, SDrun = 10,
  SDrep = 10, biais = 0)

Arguments

MyDOE

is a data.frame with 6 columns (RunTechnician, ConcentrationLabel,+ ConcentrationValue, CalibCurve, ReplicateNumber, Responses). This data.frame is produced by a DOE generating function.

intercept

the intercept of the linear model.

slope

the slope of the linear model.

SDrun

the standard deviation between analytical runs.

SDrep

the standard deviation between replicates (within an analytical run).

biais

the bias between the true values and the simulated data.

Value

The output is a data.frame with 6 columns (RunTechnician, ConcentrationLabel, ConcentrationValue, CalibCurve, ReplicateNumber,Responses). Responses column is filled with the simulated data following a linear model with normal random error.

See Also

DOE generating functions such as calib_doe DOE_Run_Repl_Conc

Examples

1
2
3
4
5
6
7
8
9
MyDOE <- calib_doe(nRun = 2, nCalibCurvesPerRun = 3, nrepCalib = 5,
  ConcVect = c(0,50, 100, 125, 150, 175, 200))
CalibDs <- norm_lin_dataset_sim(MyDOE, intercept = 1, slope = 2, SDrun=1.5,
 SDrep=3, biais = 0)

 monDOE = DOE_Run_Repl_Conc(nRun = 3, nreplicates = 2, ConcVect = c(0, 50, 100, 125,150, 175, 200 ),
  Threshold='NaN', factorlist=c('RunTechnician','ConcentrationLabel','ConcentrationValue',
  'ReplicateNumber','Status','Response'))
 TPL <- norm_lin_dataset_sim(monDOE, intercept = 1, slope = 2, SDrun=1.5, SDrep=3, biais = 0)

NicolasEDubois/anaval documentation built on May 7, 2019, 6:18 p.m.