Attachment | Size |
---|---|
Script [6] | 3.5 KB |
Data file containing correlation matrices [7] | 2.27 KB |
Data file containing sample sizes for correlation matrices [8] | 75 bytes |
Data file containing cluster variables, originally read as xlsx in script but converted to xls to upload here [9] | 26 KB |
Dear Mike and others,
I would like to conduct a fixed effect MASEM with clusters and I am stuck when I try to run TSSEM1. At first I tried to use a cluster variable that I labeled, and then I tried to use the cluster variable without labels (just "0" and "1" codes). I got different error messages each time.
I don't use R much and I don't know how to format the data in exactly the same way they are formatted in the examples on Mike's website (all data in a single file). I was able to run a random effects TSSEM1 and TSSEM2 the way my data were formatted, without clusters.
I have pasted the error messages below and also attached the R script and data files.
Thank you in advance for your help with this,
Mei Yi
> #Run fixed-effect TSSEM1 according to cluster labels
> cluster1 <- tssem1(vector, n, method="FEM",
+ cluster=mod$IPT1)
Error in if (!all(isPD)) warning(paste("Group ", (1:no.groups)[!isPD], :
missing value where TRUE/FALSE needed
In addition: Warning message:
Unknown or uninitialised column: 'IPT1'.
> #Run fixed-effect TSSEM1 according to cluster labels
> cluster1 <- tssem1(vector, n, method="FEM",
+ cluster=mod$IPT)
Error in tssem1FEM(data.cluster[[i]], n.cluster[[i]], cor.analysis = cor.analysis, :
Lengths of "df" and "n" are different.
In addition: Warning message:
In split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) :
data length is not a multiple of split variable
> summary(cluster1)
Error in summary(cluster1) : object 'cluster1' not found