# NOT RUN {
# data
if (require(BGGM)) library(BGGM)
Y <- ptsd
# names
colnames(Y) <- letters[1:20]
# estimate model
est <- estimate(Y)
# test
bggm_comb <- lin_comb("a--c + a--d > b--c + b--d",
obj = est,
ci = 0.90,
rope = c(-0.1, 0.1))
# print
bggm_comb
# Using a contrast matrix to test pairwise differences
vars <- c("a--c", "a--d", "b--c")
contrast_mat <- matrix(c(1, -1, 0,
1, 0, -1,
0, 1, -1), nrow = 3, byrow = TRUE)
bggm_comb <- lin_comb(vars,
obj = est,
ci = 0.90,
contrast = contrast_mat)
# print
bggm_comb
# }
Run the code above in your browser using DataLab