Happy new year!
Here is my question:
Code:
clear set seed 2020 set obs 400 set more off seq time, f(0) t(3) b(1) seq id, f(1) t(100) b(4) gene depression = round(runiform()) gene drug = cond(id>50,1,0) meprobit depression drug##time || id: , nolog contrast drug@time, nowald effects margins drug#time
Code:
margins drug#time Adjusted predictions Number of obs = 400 Model VCE : OIM Expression : Marginal predicted mean, predict() ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- drug#time | 0 0 | .4600545 .0704564 6.53 0.000 .3219624 .5981465 0 1 | .4200706 .0697705 6.02 0.000 .2833228 .5568183 0 2 | .4399289 .0702464 6.26 0.000 .3022484 .5776094 0 3 | .4800251 .0706285 6.80 0.000 .3415959 .6184543 1 0 | .4197953 .0698913 6.01 0.000 .2828109 .5567796 1 1 | .4398788 .070273 6.26 0.000 .3021462 .5776114 1 2 | .5598365 .0701128 7.98 0.000 .422418 .6972551 1 3 | .5000074 .0706692 7.08 0.000 .3614984 .6385165 ------------------------------------------------------------------------------
How do I test the difference between the marginal probability .5000074 - .4800251 ? Is it correct to estimate the statistical significance by?
Code:
lincom 1.drug#3.time-0.drug#3.time
All the best,
Tiago
0 Response to How to estimate the risk difference with margins after meprobit
Post a Comment