generateData: Generate Simulation Data of Up-and-Down Experiment

Description Usage Arguments Value Examples

View source: R/generateData.R

Description

The function is used to generate simulation data of up-and-down experiment, and provide three cases that tolerance distribution obeys normal, triangle or chi-square distribution.

Usage

1
2
3
generateData(number, useTurPoint = F, start, doseStep = 1,
  distribution = c("Normal", "Triangle", "Chi-square"), normalMean = 0,
  normalStd = 1, triMean = 0, triWidth = 2, chiDegree = 1)

Arguments

number

The number of experiments in a trail.

useTurPoint

A logical value indicating whether the parameter number refers to the amount of turning points. The default value is F.

start

The first dose level given in this trail.

doseStep

A fix value that represents the difference between two adjacent dose levels.

distribution

The tolerance distribution, including normal, triangle and chi-square distribution, and the default distribution is N(0, 1).

normalMean

Parameter mean of normal distribution, the default value is 0.

normalStd

Parameter std of normal distribution, the default value is 1.

triMean

Parameter mean of triangle distribution, the default value is 0.

triWidth

Parameter width of triangle distribution, the default value is 2.

chiDegree

Parameter degree of freedom of chi-square distribution, the default value is 1.

Value

A data frame.

Examples

1
2
3
library(ed50simulation)
generateData(number = 20, start = 2, doseStep = 0.2, distribution = 'Normal')
generateData(number = 40, start = 2, doseStep = 0.2, distribution = 'Chi-square')

ed50simulation documentation built on Oct. 30, 2019, 9:57 a.m.