AR1mat: Autocorrelation matrix of order 1.

AR1R Documentation

Autocorrelation matrix of order 1.

Description

Creates an autocorrelation matrix of order one with parameters specified.

Usage

AR1(x,rho=0.25)

Arguments

x

vector of the variable to define the factor levels for the AR1 covariance structure.

rho

rho value for the matrix.

Details

Specially useful for constructing covariance structures for rows and ranges to capture better the spatial variation trends in the field. The rho value is assumed fixed and values of the variance component will be optimized through REML.

Value

If everything is defined correctly the function returns:

$nn

the correlation matrix

References

Covarrubias-Pazaran G (2016) Genome assisted prediction of quantitative traits using the R package sommer. PLoS ONE 11(6): doi:10.1371/journal.pone.0156744

See Also

The core function of the package mmer

Examples

x <- 1:4
R1 <- AR1(x,rho=.25)
image(R1)

sommer documentation built on Nov. 13, 2023, 9:05 a.m.