rae {SOP} | R Documentation |
Defining random effects in SOP formula
Description
Auxiliary function used to define random effects terms in a sop
model formula.
Usage
rae(x)
Arguments
x |
the x-variable (factor) that defines the random effects term. |
Details
The functions is designed to represent random effects in SOP formulae.
Value
The function is interpreted in the formula of a sop
model and creates the right framework for fitting the random effect. List containing the following elements:
x |
name of the covariate involved. |
See Also
Examples
library(SOP)
require(SpATS)
## An example of use of SOP package for the analysis of field trials experiments.
## Taken from the SpATS package.
data(wheatdata)
# Create factor variable for row and columns
wheatdata$R <- as.factor(wheatdata$row)
wheatdata$C <- as.factor(wheatdata$col)
# package SOP
m0 <- sop(formula = yield ~ colcode + rowcode +
f(col, row, nseg = c(10, 10)) +
rae(geno) + rae(R) + rae(C), data = wheatdata)
summary(m0)
plot(m0, col = topo.colors(100))
[Package SOP version 1.0-1 Index]