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 one or several environments.

Usage

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

Arguments

dfr

The name of the data frame.

vars

The names of the columns for variables 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.

method

The method to compute genotypic covariances and phenotypic variances. See details.

Details

If env = NULL data from only one environment is considered. If rep = NULL data from only one replication is considered without blocking structure. If method = 1 genotypic covariances are computed from BLUEs and phenotypic covariances are computed from BLUPs. If method = 2 the covariances between each pair of variables are computed using the variances of each variable and the variances of the sum. If method = 3 the genotypic covariances are approximated using the average of the correlation matrices computed with each replication in each environment, and the phenotypic covariances are computed pooling all the observed data.

Value

It returns the genotypic and phenotypic covariance and correlation matrices.

Author(s)

Raul Eyzaguirre.

Examples

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

reyzaguirre/st4gi documentation built on March 29, 2025, 10:38 p.m.