Learn R Programming

MCMCglmm (version 2.36)

sir: Design Matrix for Simultaneous and Recursive Relationships between Responses

Description

Forms design matrix for simultaneous and recursive relationships between responses

Usage

sir(formula1=NULL, formula2=NULL, diag0=FALSE)

Value

design matrix

Arguments

formula1

formula

formula2

formula

diag0

logical: should the design matrix have zero's along the diagonal

Author

Jarrod Hadfield j.hadfield@ed.ac.uk

Examples

Run this code
fac1<-factor(sample(letters[1:3], 5, TRUE), levels=letters[1:3])
fac2<-factor(sample(letters[1:3], 5, TRUE), levels=letters[1:3])
cbind(fac1, fac2)
sir(~fac1, ~fac2)

Run the code above in your browser using DataLab