rcor-methods: Extract the R-side variance components from a fitted model...

rcorR Documentation

Extract the R-side variance components from a fitted model (asreml or lme) and format them as matrices.

Description

Extract the R-side variance components from a fitted model (asreml or lme) and format them as matrices.

Usage

rcor(obj)

## S3 method for class 'gls'
rcor(obj)

## S3 method for class 'asreml'
rcor(obj)

## S3 method for class 'asremlrmat'
print(x, n = 6, dig = 3, ...)

Arguments

obj

A fitted model object.

x

Object to print

n

Size of matrix corner to print

dig

Number of digits for printing

...

Other arguments (not used)

Value

A list of matrices.

Examples

## Not run: 
require('agridat')
dat <- hanks.sprinkler
dat <- transform(dat, subf=factor(subplot),
                 irrf=factor(irr))
dat <- dat[order(dat$block, dat$gen, dat$subplot),]
m1 <- asreml(yield ~ gen + dir + irrf + gen:dir + gen:irrf + dir:irrf,
             data=dat,
             random= ~ block + block:dir + block:irrf,
             rcov= ~ block:gen:corb(subf, k=3))
require("lucid")
lucid(rcor(m1)$subf[1:8,1:8],dig=2)

## End(Not run)

kwstat/covardat documentation built on Jan. 27, 2024, 1:22 a.m.