# NOT RUN {
## A few ways to specify the same matrix
lotri({et2 + et3 + et4 ~ c(40,
0.1, 20,
0.1, 0.1, 30)})
## You do not need to enclose in {}
lotri(et2 + et3 + et4 ~ c(40,
0.1, 20,
0.1, 0.1, 30),
et5 ~ 6)
## But if you do enclose in {}, you can use multi-line matrix specifications:
lotri({et2 + et3 + et4 ~ c(40,
0.1, 20,
0.1, 0.1, 30);
et5 ~ 6;
})
## You can also add lists or actual R matrices as in this example:
lotri(list(et2 + et3 + et4 ~ c(40,
0.1, 20,
0.1, 0.1, 30),
matrix(1,dimnames=list("et5","et5"))))
## Overall this is a flexible way to specify symmetric block diagonal matrices.
# }
Run the code above in your browser using DataLab