PSPMdemo {PSPManalysis}R Documentation

Demographic analysis of a structured population model

Description

PSPMdemo computes the population growth rate of a physiologically structured population model and its sensitivities with respect to all model parameters. PSPMdemo either carries out these computation for a single parameter set or varies one of the parameters over a range of values specified by the user

Usage

PSPMdemo(
  modelname = NULL,
  curvepars = NULL,
  parameters = NULL,
  options = NULL,
  clean = FALSE,
  force = FALSE,
  debug = FALSE,
  silent = FALSE
)

Arguments

modelname

(string, required)

Basename of the file with model specification. The file should have extension ".h". For example, the model "Medfly" is specified in the file "Medfly.h". If the model is specified in R include the .R extension explicitly, i.e. specify the model name as "Medfly.R"

curvepars

(row vector, optional, can be left equal to its default NULL)

Vector of length 5, specifying:

⁠curvepars[1]⁠: the index of the parameter to vary (in case the model is specified in R, this can be a string with the name of the parameter as specified in the variable 'DefaultParameters')

⁠curvepars[2]⁠: the initial value of the parameter

⁠curvepars[3]⁠: the step size in the parameter value

⁠curvepars[4]⁠: lower threshold, below which value of the parameter the computation stops

⁠curvepars[5]⁠: upper threshold, above which value of the parameter the computation stops

parameters

(row vector, optional, can be left equal to its default NULL)

Vector of length PARAMETER_NR (set in the model program file; This is the length of the variable 'DefaultParameters' if the model is specified in R), specifying the values for the model parameters to use in the computation. Vectors of other lengths, including an empty vector will be ignored.

options

(row vector of strings, optional, can be left equal to its default NULL)

Vector with pairs of strings, consisting of an option name and a value (for example c("isort", "1")) or single options (i.e. c("test")). Possible option names and their values are:

⁠"isort", "<index>"⁠: Index of i-state variable to use as ruling variable for sorting the structured populations

⁠"report", "<value>"⁠: Interval between consecutive output of computed points to the console ( >= 1). Minimum value of 1 implies output of every point

⁠"test"⁠: Perform only a single integration over the life history, reporting dynamics of survival, R0, i-state and interaction variables

clean

(Boolean, optional argument)

Specify clean = TRUE as argument to remove all the result files of the model before the computation

force

(Boolean, optional argument)

Specify force = TRUE as argument to force a rebuilding of the model before the computation

debug

(Boolean, optional argument)

Specify debug = TRUE as argument to compile the model in verbose mode and with debugging flag set

silent

(Boolean, optional argument)

Specify silent = TRUE as argument to suppress reporting of compilation commands and results on the console

Details

output <- PSPMdemo(modelname = NULL, curvepars = NULL, parameters = NULL, options = NULL, clean = FALSE, force = FALSE, debug = FALSE, silent = FALSE)

Value

The output is a list containing the following elements:

⁠curvepoints⁠: Matrix with output for all computed points along the curve

⁠curvedesc⁠: Column vector with strings, summarizing the numerical details of the computed curve (i.e., initial point, parameter values, numerical settings used).

Examples

## Not run: 
PSPMdemo("Medfly", c(2, 11, 0.1, 11, 16))

## End(Not run)


[Package PSPManalysis version 0.3.9 Index]