calc_linked_params_BioGeoBEARS_model_object: Update parameters that are deterministic functions of free...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/BioGeoBEARS_classes_v1.R

Description

This function updates the linked parameters (which are listed as neither "fixed" nor "free" in params_table$type; i.e., they are equations which are calculated from #' the fixed and free parameters, which should have already been set by other functions).

Usage

1
2
  calc_linked_params_BioGeoBEARS_model_object(BioGeoBEARS_model_object,
    update_init = FALSE)

Arguments

BioGeoBEARS_model_object

The BioGeoBEARS_model object, of class BioGeoBEARS_model

update_init

If TRUE, put the estimates into the initial values in the params_table. Default: FALSE.

Details

params_table$type is typically stored in: BioGeoBEARS_run_object$BioGeoBEARS_model_object@params_table.

Value

BioGeoBEARS_model_object Updated version of the BioGeoBEARS_model object, of class BioGeoBEARS_model.

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster

Matzke_2012_IBS

See Also

define_BioGeoBEARS_model_object define_BioGeoBEARS_run

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# Define a BioGeoBEARS run object
BioGeoBEARS_run_object = define_BioGeoBEARS_run()
BioGeoBEARS_run_object$BioGeoBEARS_model_object@params_table

# Set 'j' to be free, i.e. as in a DEC+J model (adding jump dispersal
# to the LAGRANGE DEC model)
BioGeoBEARS_run_object$BioGeoBEARS_model_object@params_table["j","type"] = "free"
BioGeoBEARS_run_object$BioGeoBEARS_model_object@params_table["j","init"] = 0.25
BioGeoBEARS_run_object$BioGeoBEARS_model_object@params_table["j","est"] = 0.25

# Display result
BioGeoBEARS_run_object$BioGeoBEARS_model_object@params_table

# Update the other parameters
BioGeoBEARS_run_object$BioGeoBEARS_model_object =
calc_linked_params_BioGeoBEARS_model_object(
BioGeoBEARS_model_object=BioGeoBEARS_run_object$BioGeoBEARS_model_object)

# Display result
BioGeoBEARS_run_object$BioGeoBEARS_model_object@params_table

BioGeoBEARS documentation built on May 29, 2017, 8:36 p.m.