Hi,
I’m running a two-part model in Stata where the first part is a logit model and the second part is a GLM with a gamma distribution and log link. The outcome is healthcare cost, and my variable of interest is gender. I’ve included exposure (number of months) in the model using the exposure() option.
I’d like to know:
How can I use margins to obtain the predicted cost per month, rather than the overall cost (margin i.gender)?
I tried using the expression() option in margins to get the predicted cost per month, but I’m not sure what exactly should go in the expression
Thank you!
Wayne
I’m running a two-part model in Stata where the first part is a logit model and the second part is a GLM with a gamma distribution and log link. The outcome is healthcare cost, and my variable of interest is gender. I’ve included exposure (number of months) in the model using the exposure() option.
I’d like to know:
How can I use margins to obtain the predicted cost per month, rather than the overall cost (margin i.gender)?
I tried using the expression() option in margins to get the predicted cost per month, but I’m not sure what exactly should go in the expression
Thank you!
Wayne