parmat function

Create a matrix of parameters

Create a matrix of parameters

parmat is a utility that makes a vector of parameters suitable for use in pomp functions.

parmat(params, ...) ## S4 method for signature 'numeric' parmat(params, nrep = 1, ..., names = NULL) ## S4 method for signature 'array' parmat(params, nrep = 1, ..., names = NULL) ## S4 method for signature 'data.frame' parmat(params, nrep = 1, ...)

Arguments

  • params: named numeric vector or matrix of parameters.
  • ...: additional arguments, currently ignored.
  • nrep: number of replicates (columns) desired.
  • names: optional character; column names.

Returns

parmat returns a matrix consisting of nrep copies of params.

Examples

# takes too long for R CMD check ## generate a bifurcation diagram for the Ricker map p <- parmat(coef(ricker()),nrep=500) p["r",] <- exp(seq(from=1.5,to=4,length=500)) trajectory( ricker(), times=seq(from=1000,to=2000,by=1), params=p, format="array" ) -> x matplot(p["r",],x["N",,],pch='.',col='black', xlab=expression(log(r)),ylab="N",log='x')

Author(s)

Aaron A. King

  • Maintainer: Aaron A. King
  • License: GPL-3
  • Last published: 2025-04-16