mpp2ddSim {dwp}R Documentation

Convert Distribution Name + Parameters to ddSim Object

Description

Utility function to format a distribution name and a vector of its parameter values to a ddSim object for use in the p/d/r/q family of functions

Usage

mpp2ddSim(distr, parms)

Arguments

distr

character string giving the name of one of the models fit by ddFit

parms

vector of parameters for the distr, or, alternatively, an array of parameter sets. Parameterization may follow either the GLM format or the distribution format. For example, the xep01 model (gamma distribution) has GLM parameters for log(r) and r, which are the coefficients of the polynomial in the xep01 format (namely, x * exp(b0*log(r) + b1*r)), or the gamma distribution parameters, shape and rate. The elements of parameter vector must be named. For example, parms = c(log(r) = -0.373, r = -0.0147) for the GLM format for an xep01 model or, equivalently, parms = c(shape = 1.63, rate = 0.0147) for the distribution format. If both formats are given, the GLM parameters are used and the distribution parameters ignored.

Value

a ddSim object with srad = NA


[Package dwp version 1.1 Index]