Learn R Programming

glinvci (version 1.2.4)

rglinv: Simulate random trait values from models.

Description

Simulate random trait values from the Gaussian branching process specified by mod.

Usage

rglinv(mod, par, Nsamp, simplify)

# S3 method for glinv rglinv(mod, par, Nsamp = 1, simplify = TRUE)

# S3 method for glinv_gauss rglinv(mod, par, Nsamp = 1, simplify = TRUE)

Value

A list containing Nsamp elements, each of which represents a sample point from the model mod. The format of each elements depends on the simplify argument.

Arguments

mod

Either a glinv_gauss or glinv object.

par

Parameters underlying the simulation, in the same format as lik.glinv_gauss or lik.glinv.

Nsamp

Number of sample point to simulate.

simplify

If TRUE, rglinv.glinv returns an Nsamp-element list with each element being a tip-trait matrix; otherwise, rglinv.glinv returns an Nsamp-element list with each element being an \(n\)-element list of \(k\)-element trait vectors, where \(n\) is the number of tips and \(k\) is the dimension of each trait vector.