buildModelClass {hybridModels}R Documentation

It builds an object of a pre-specified class.

Description

buildModelClass is generic function that calls a method to create a object base on model's name.

Usage

buildModelClass(
  x,
  var.names,
  init.cond,
  model.parms,
  probWeights,
  emigrRule,
  prop.func = NULL,
  state.var = NULL,
  infl.var = NULL,
  state.change.matrix = NULL
)

Arguments

x

is an empty object of a class requested.

var.names

a list with variable names of the network: the donor node, the receiver node, the time when each connection between donor to the receiver happened and the weight of these connection. The variables names must be "from", "to", "Time" and "arc", respectively.

init.cond

a named vector with initial conditions.

model.parms

a named vector with model's parameters.

probWeights

a named vector (optional and for migration type only) mapping state variables to migration probability weights based on state variables. These argument can be used to give weights for sampling individuals from node. They need not sum to one, they should be non-negative and not zero. For more information on the sampling method sample.

emigrRule

a string (optional and for migration type only) stating how many individual emigrate based on state variables. It requires that the network have weights instead of number of individuals that migrate.

prop.func

a character vector with propensity functions of a generic node. See references for more details

state.var

a character vector with the state variables of the propensity functions.

infl.var

a named vector mapping state variables to influence variables.

state.change.matrix

is a state-change matrix. See references for more details

Value

An object of the class requested.

References

.


[Package hybridModels version 0.3.7 Index]