'Aliased coefficient problem in R mma package

I am trying to replicate Yu's example code for mediation analysis but keep getting this error:

library("mma")
data("weight_behavior")
x=weight_behavior[,2:14]
pred=weight_behavior[,3]
y=weight_behavior[,15]
data.bin<-data.org(x,y,pred=pred,contmed=c(7:9,11:12),binmed=c(6,10),binref=c(1,1), catmed=5,catref=1,predref="M",alpha=0.4,alpha2=0.4)

Error in Anova.III.LR.glm(mod, singular.ok = singular.ok) : there are aliased coefficients in the model

I understand this is because of collinearity but don't know how to fix it. Any help is much appreciated, Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source