data("weight_behavior")
#binary x
#binary y
x=weight_behavior[,2:14]
y=weight_behavior[,15]
temp.b.b.glm<-mma(x,y,pred=2,contmed=c(8:10,12:13),binmed=c(7,11),
binref=c(1,1),catmed=6,catref=1,predref="M",alpha=0.4,alpha2=0.4,
jointm=NULL,margin=1, n=2,seed=sample(1:1000,1),mart=FALSE,nu=0.001,
D=3,distn="bernoulli",family1=binomial(link = "logit"),n2=2)
temp.b.b.mart<-mma(x,y,pred=2,contmed=c(8:10,12:13),binmed=c(7,11),
binref=c(1,1),catmed=6,catref=1,predref="M",alpha=0.4,alpha2=0.4,
jointm=NULL,margin=1, n=2,seed=sample(1:1000,1),mart=TRUE,nu=0.05,
D=3,family1=binomial(link = "logit"),n2=5)
#continuous y
x=weight_behavior[,2:14]
y=weight_behavior[,1]
temp.b.c.glm<-mma(x,y,pred=2,contmed=c(8:10,12:13),binmed=c(7,11),
binref=c(1,1),catmed=6,catref=1,jointm=list(n=1,j1=8:10),biny=FALSE,
predref="M",alpha=0.4,alpha2=0.4,n=2,seed=1,mart=FALSE,nu=0.05,D=3,n2=2)
temp.b.c.mart<-mma(x,y,pred=2,contmed=c(8:10,12:13),binmed=c(7,11),
binref=c(1,1),catmed=6,catref=1,jointm=list(n=1,j1=8:10, j2=12:13),biny=FALSE,
predref="M",alpha=0.4,alpha2=0.4, margin=1, n=2,seed=1,mart=TRUE,
nu=0.05,n2=2)
Run the code above in your browser using DataLab