IMHO in line 185 the code should be (analogous to the single-group case)
targettaunames <- rownames(coef$tau)
rather than
targettaunames <- rownames(coef[[1]]$tau)
Otherwise, you get this error message:"Error in coef[[1]]$tau : $ operator is invalid for atomic vectors" But maybe I'm mistaken.
Dear Sunthud,
IMHO in line 185 the code should be (analogous to the single-group case) targettaunames <- rownames(coef$tau) rather than targettaunames <- rownames(coef[[1]]$tau) Otherwise, you get this error message:"Error in coef[[1]]$tau : $ operator is invalid for atomic vectors" But maybe I'm mistaken.
Kind regards, Ulrich PS: please see also my question on the lavaan forum: https://groups.google.com/forum/#!topic/lavaan/J_bT_1lYXFU%5B1-25%5D