Hi all, I am currently trying to conduct a compositional mediation analysis using the "ccmm" package in R Studio. I have adapted the code as suggested by Sohn and Li (2017) https://cran.r-project.org/web/packages/ccmm/ccmm.pdf. However, I am recieving an error message, but there is no missing data in the datafile.
Any advice would be greatly appreciated.
outcome <- ccmm_test_data$Performance
treatment <- ccmm_test_data$Ethnicity
mediators <- as.matrix(ccmm_test_data[,8:13]);
covariates <- as.matrix(ccmm_test_data[,4:7]);
# Run CCMM
rslt.ccmm <- ccmm(outcome, mediators, treatment, covariates)
Error in while (sum(abs(bet - bet0)) > tol && iter2 < 1000) { :
missing value where TRUE/FALSE needed