Extract a Specific Matrix from a 'VCA' Object.

Share:

Description

For convenience only, extracting a specific matrix from the "Matrices" element of a 'VCA' object if this matrix exists.

Usage

1
getMat(obj, mat)

Arguments

obj

... (VCA) object

mat

... (character) string specifying the matrix to be extracted

Details

When 'mat="Z"' the design matrix of random effects will be returned. If one is interested in the design matrix of random effects for a specific variance component use a name like "Z" + NAME, where NAME has to be equal to the name of the VC in the 'VCA' object (see examples). The same applies to the A-matrices in the quadratic forms, use "A" + NAME for extracting a specific A-matrix.

Value

(matrix) as requested by the user

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
data(dataEP05A2_1)
fit <- anovaVCA(y~day/run, dataEP05A2_1)
getMat(fit, "Z")
getMat(fit, "Zday")
getMat(fit, "Zday:run")
getMat(fit, "Zerror")
fit2 <- anovaMM(y~day/(run), dataEP05A2_1)
getMat(fit2, "V")			 	# Var(y)
getMat(fit2, "G")				# Var(re)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.