The diagram package is very powerful in plotting a matrix. It can be used to plot a structure equation model.
Assume that there are four constructs (4, 5, 12, 13) and each one is reflected by three factors. Construct 4 is connected to 5 and 13 and construct 12 is connected to 5 and 13. This can be shown as following.
library(diagram)
## Loading required package: shape
# openplotmat()
pos = coordinates(c(4, 4, 4, 4, 4, 4, 4))
pos2 = pos[-c(2,3,10:11,13:16,18:19,26:27), ]
n2 = dim(pos2)[1]
M <- matrix(nrow = n2, ncol = n2, byrow = TRUE, data = 0)
M[[1,4]] <- M[[3,4]] <- M[[7,4]] <- ''
M[[2,5]] <- M[[6,5]] <- M[[8,5]] <- ''
M[[9,12]] <- M[[11,12]] <- M[[15,12]] <- ''
M[[10,13]] <- M[[14,13]] <- M[[16,13]] <- ''
M[[5,4]]<-''; M[[13,4]]<-''; M[[5,12]]<-''; M[[13,12]]<-''
plotmat(
M,
pos = pos2,
box.size = c(rep(.03,3),rep(.06,2),rep(.03,6),rep(.06,2),rep(.03,3)),
curve = 0,
lwd = 1,
box.type=c(rep('rect',3),rep('ellipse',2),rep('rect',6),rep('ellipse',2),rep('rect',3)),
box.col = c(rep(5,3),rep(3,2),rep(5,6),rep(3,2), rep(5,3)),
arr.pos = 0.70,
arr.type = 'curved',
main="SEM")