rn_cs_gen | R Documentation |
\mathbf{G}
-matrix from a character-state modelThis function takes the \mathbf{G}
-matrix estimated from a character-state model and returns the values for V_{\text{Add}}
, V_{\text{A}}
, V_{\text{A}\times\text{E}}
and n_{\text{eff}}
rn_cs_gen(G_cs, wt = NULL)
G_cs |
(Additive) genetic variance-covariance matrix estimated from a character-state model (i.e. where environments are treated as a categorical variable). (numerical matrix) |
wt |
Weights to apply to the different environments, e.g. reflecting their frequencies in the wild. The weights must non-negative, and at least one must be non-zero. The vector |
V_{\text{Add}}
is the (weighted) average of the diagonal elements of G_cs
, V_{\text{A}}
is the (weighted) average of all the elements of G_cs
and V_{\text{A}\times\text{E}}
is the difference between V_{\text{Add}}
and V_{\text{A}}
. Finally, the efficient number of dimensions n_{\text{eff}}
is the ratio of the sum of the eigen values of G_cs
over its maximum eigen value. Note that n_{\text{eff}}
is returned for information, but is expected to be biased in practice due to an over-estimation of the maximum eigen value.
This function yields V_{\text{Add}}
, V_{\text{A}}
, V_{\text{A}\times\text{E}}
and n_{\text{eff}}
as a one-row data.frame (data.frame, all numeric).
Pierre de Villemereuil
rn_vgen
, rn_gen_decomp
G <- diag(10)
rn_cs_gen(G_cs = G)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.