ecm: Estimate Genotypic and Phenotypic Covariance and Correlation...

View source: R/ecm.R

ecmR Documentation

Estimate Genotypic and Phenotypic Covariance and Correlation Matrices

Description

This function estimates the genotypic and phenotypic covariance and correlation matrices with data from a RCBD with one or several environments.

Usage

ecm(traits, geno, env = NULL, rep, dfr, method = 1)

Arguments

traits

The names of the columns for traits to include.

geno

The name of the column that identifies the genotypes.

env

The name of the column that identifies the environments.

rep

The name of the column that identifies the replications or blocks. A RCBD is assumed.

dfr

The name of the data frame.

method

The method to compute genotypic covariances. See details.

Details

If env = NULL a RCBD with one environment is considered. If method = 1 the covariances between each pair of traits are computed using the variances of each trait and the variances of the sum. If method = 2 the covariance matrices are approximated using the average of the correlation matrices computed with each replication in each environment.

Value

It returns the genotypic and phenotypic covariance and correlation matrices.

Author(s)

Raul Eyzaguirre.

Examples

traits <- c("rytha", "bc", "dm", "star", "nocr")
ecm(traits, "geno", "loc", "rep", spg)

reyzaguirre/st4gi documentation built on April 20, 2024, 3:53 a.m.