r - plotting hurdle regression output -


i attempting plot hurdle regression output interaction term in r, having trouble doing count portion of model.

model <- hurdle(suicide. ~ age + gender + bullying*support, dist = "negbin", link = "logit") 

since unaware of approaches allow me plot these data without estimating each portion separately (binomial logit , negative binomial count), attempting plot each using estimates using mass package. far, have had best luck using visreg package plotting, open other suggestions. have been able reproduce , plot original logistic output hurdle model, not negative binomial count data (i.e., parameter estimates mass not same in hurdle regression output).

i appreciate insight regarding how others have plotted hurdle regression results in past, or how might able reproduce negative binomial coefficients obtained hurdle model using glm.nb in mass.

here using plot data:

##logistic   logistic<-glm(suicidebinary ~ age + gender + bullying*support, data = sx, family="binomial")  data("sx", package = "mass") ##linear scale visreg(logistic, "bullying", by="support", xlab = "bullying", ylab = "log odds (suicide yes/no)")  ##logistic/probability scale visreg(logistic, "bullying", by="support", scale = "response", xlab = "bullying", ylab = "p(initial attempt)")  ##count model  negbin<-glm.nb(suicide. ~ age + gender + bullying*support, data = sx)  data("sx", package = "mass") ##linear scale visreg(negbin, "bullying", by="support", xlab = "bullying", ylab = "count model (number of suicide attempts)")  ##logistic/probability scale visreg(negbin, "bullying", by="support", scale = "response", xlab = "bullying", ylab = "p(subsequent attempts)") 


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -