Learn R Programming

MCPMod (version 1.0-10.1)

genDFdata: Simulate dose-response data

Description

The function simulates normally distributed dose-response data, according to a prespecified dose-response model (or mean vector) and a given standard deviation.

Usage

genDFdata(model, argsMod, doses, n, sigma, mu = NULL)

Arguments

model

Character string giving the name of a model function. The first argument of the model function should be the dose variable.

argsMod

A vector with the arguments for the model function.

doses

Dose levels to be used.

n

Group sample sizes.

sigma

Standard deviation.

mu

If model is not specified mu is used to determine the mean vector of the observations.

Value

A data frame with two columns called dose and resp, corresponding to the dose and simulated response values.

Examples

Run this code
# NOT RUN {
# use emax model
genDFdata("emax", c(e0 = 0.2, eMax = 1, ed50 = 0.05), c(0,0.05,0.2,0.6,1), 20, 1)
# use fixed mean vector
genDFdata(mu = 1:5, doses = 0:4, n = c(20, 20, 10, 5, 1), sigma = 0.2)
# }

Run the code above in your browser using DataLab