randomITV {comsimitv}R Documentation

Intraspecific Trait Variation

Description

This function adds a random noise to mother's trait values of each seed

Usage

randomITV(
  seeds = matrix(),
  n.traits = 3,
  distribs = rep("unif", n.traits),
  distr.parms = list(),
  sigma = diag(1, n.traits, n.traits),
  ITV.ratio = 0.01,
  ...
)

Arguments

seeds

Matrix of produced seeds (with mother'trait values) as produced by SeedProduction function

n.traits

Number of traits

distribs

Types of the distributions of traits (see Gener.species.pool)

distr.parms

Parameters of distribution (see Gener.species.pool)

sigma

Matrix of variance-covariance matrix of traits (see Gener.species.pool)

ITV.ratio

Ratio of within/between species variances of traits

...

Any additional parameters

Details

The function uses parameters of Gener.species.pool. First it transforms back mother's trait values to multivariate normal distribution. Then random noise was added to this values. Random noise has multivariate normal distribution, with zero means and the same correlation structure as specified in parameter sigma. Note that sigma specifies covariance matrix, not correlation structure per se. Variances in the random noise are diagonals (i.e. variance componens) of parameter sigma multiplied by ITV.ratio. The non-diagonal elements of covariance matrix were specified to conserve the correlation structure among traits.

Value

Matrix of produced seeds as produced by SeedProduction function


[Package comsimitv version 0.1.5 Index]