sim-methods: Methods for Function 'sim' in Package 'QMRA'

Description Usage Arguments Methods Examples

Description

Simulate concentration from objects of class "ea", "bea" and dose-reponse from objects of class "drm" and "bdrm".

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'ea'
sim(x, n, ...)

## S4 method for signature 'bea'
sim(x, n, ...)

## S4 method for signature 'drm'
sim(x, n, dose, ...)

## S4 method for signature 'bdrm'
sim(x, n, dose, ...)

Arguments

x

Object of class "ea", "bea", "drm" or "bdrm".

n

Number of simulations.

dose

Doses for which the reponse needs to be simulated.

...

Other arguments to be passed to sim; currently ignored.

Methods

signature(x = "bdrm")
signature(x = "bea")
signature(x = "drm")
signature(x = "ea")

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Exposure assessment from count data
ea_fit <- ea_count(x = counts, q = volume,
                   data = crypto, model = "negbin")
## Simulate 100 concentrations from fitted distribution
sim(ea_fit, n = 100)

## Fit Beta-Poisson model to Campylobacter dataset
drm_fit <- drm(x = infected, n = total, dose = dose,
               data = campy, model = "bp")
## Simulate 10 probabilities of response for doses 1:10
sim(drm_fit, n = 10, dose = 1:10)

brechtdv/QMRA documentation built on May 13, 2019, 5:06 a.m.