Error Message in Mediation Analysis

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

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.