Learn R Programming

FlywayNet (version 0.1.0)

set_freeparametersvalue: Assign free parameter values to a migration structure.

Description

Set values to free parameters. Indeed taking into account sites order, known impossible sites links, sites dead probability, not all the sites transition probabilities have to be estimated. Others parameters values may be evaluated from free parameters.

Usage

set_freeparametersvalue(
  migr,
  values,
  update_transitions = TRUE,
  update_sojourns = NULL,
  use_adhoc_dirichlet = FALSE
)

Arguments

migr

A migration structure.

values

Parameter values to set to the migration structure. these are the transition probabilities and sojourn mean time.

update_transitions

If TRUE, transitions are unknown and the values should be given in the vector 'values'.

update_sojourns

Vector of boolean, that identifies which sojourn times should be given.

use_adhoc_dirichlet

If TRUE, the transition probabilities are considered as the ad hoc dirichlet (\(q_ij\) values) explained in the documentation of the extract_parameters function.

Value

A migration structure with migr attributes excepttransition_law_param and sojourn_law_param that are changed.

Examples

Run this code
# NOT RUN {
 migr <- generate_toy_migration()
 param <- get_freeparametersvalue(migr) # just for example purpose, should be different values
 set_freeparametersvalue(migr, param)
# }

Run the code above in your browser using DataLab