# NOT RUN {
data<- data.frame(x=rnorm(500), z=rbinom(500, 1, .3))
logit.y <- with(data, x*2 + z*2); mu.y <- with(data, 10+10*x+10*z + rnorm(500))
y <- (runif(500)<exp(logit.y)/(1+exp(logit.y)))*1
y[y>0] <- mu.y[y>0]
data$y <- y
fit <- zlm(y ~ x+z, data)
summary(fit$disc)
summary(fit$cont)
#Compares likelihood ratios, currently only can drop an entire term
test.zlm(fit, type='LRT', hypothesis.matrix='x')
#Accepts arguments like car::linearHypothesisTest
test.zlm(fit, type='Wald', hypothesis.matrix=c('x=2', 'z=2'))
#Little evidence for difference in discrete, big evidence in continuous
# }
Run the code above in your browser using DataLab