Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72768

conditional and unconditional margins after two-part model

$
0
0
Hi Statalit
I use Stata 14.

I'm trying to run a two-part model (first-part : logit and second: glm/poisson/log) and the
Code:
twopm
perfectly works.
To show my results, I would like to show margins of the sample of the second part (i.e. the conditional margins) and then the unconditional margins.
When I use
Code:
margins, dydx(*)
I assume it gives unconditional margins for the whole population.
But It seems I cannot use
Code:
if e(sample)
because the value stored is the sample of the first part.

I guess I could use a step by step approach to independently run my GLM model in patients with non zero values and then use margins.

But, does another easier mean exist?
Thank you very much for you help

Viewing all articles
Browse latest Browse all 72768

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>