init.simulate.StateAndExp: Initialize state and expectation matrices

View source: R/simulate.R

init.simulate.StateAndExpR Documentation

Initialize state and expectation matrices

Description

Function used in simulate for BM/OU initializations.

Usage

init.simulate.StateAndExp(phy, p, root.state, simulate_random)

Arguments

root.state

(list): state of the root, with: random : random state (TRUE) or deterministic state (FALSE) value.root : if deterministic, value of the character at the root exp.root : if random, expectation of the character at the root var.root : if random, variance of the character at the root (pxp matrix)

phy:

Input tree.

p:

dimension of the trait simulated

Value

paramSimu: array p x Nnode x 2 (BM), filled with NAs. Slice paramSimu[, ntaxa + 1, ] (array p x 2) is initialized with simulated states and root expectations for all the traits.


PhylogeneticEM documentation built on Aug. 31, 2022, 9:16 a.m.