nonparametric {denim}R Documentation

Nonparametric distribution

Description

Convert a vector of frequencies, percentages... into a distribution

Usage

nonparametric(x, dist_init = FALSE)

Arguments

x

a vector of values

dist_init

whether to distribute initial value across subcompartments following this distribution. (default to FALSE, meaning init value is always in the first compartment))

Value

a Distribution object for simulator

Examples

transitions <- list("S->I"=nonparametric( c(0.1, 0.2, 0.5, 0.2) ))
transitions <- denim_dsl({S->I=nonparametric( c(0.1, 0.2, 0.5, 0.2) )})
# you can also define a model parameter for the distribution
transitions <- denim_dsl({S->I=nonparametric( dwelltime_dist )})

[Package denim version 1.2.1 Index]