Dear All,
I'm hoping someone call tell if there is a way to estimate risk ratios after using xtlogit. The data is below. To give it some context. Pregnant patients are being assessed for the binary outcome PET. Six different biomarkers are being assessed although I only included one here to keep the dataset small std_PAPPA2ngml. Basic baseline variables include age, BMI pre-pregnancy, race, blood pressure (clinicMAP), and a biometric measurement called cfpwv.
As an aside, I did use multiple imputation to deal with some missing data although I don't think it's relevant to my specific question. I will however include the code here for the sake of completeness.
And as such I used xtlogit to estimate the association between my biomarker std_PAPPA2 and the outcome PET. Trimester denotes the trimeter in pregnancy so most patients had three different measurements. So trimester is the panel variable.
Again, you can likely omit the mi estimate to answer the fundamental question I had which is:
Can you estimate a risk ratio after xtlogit rather than the odds ratio? I'm not certain that is easy to calculate but I thought I would ask if such a thing is possible using a post-estimation command or something else.
My thanks for any assistance than can be provided and apologies in advance for rather convoluted setup.
Much obliged,
Christopher
I'm hoping someone call tell if there is a way to estimate risk ratios after using xtlogit. The data is below. To give it some context. Pregnant patients are being assessed for the binary outcome PET. Six different biomarkers are being assessed although I only included one here to keep the dataset small std_PAPPA2ngml. Basic baseline variables include age, BMI pre-pregnancy, race, blood pressure (clinicMAP), and a biometric measurement called cfpwv.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int id byte(Trimester PET age) double bmi_pre_preg byte race_bin double(clinicMAP cfpwv) float(std_PAPPA2ngmL std_spRatio) 1 1 1 29 25.15589569 0 95 7.2 -.5222185 .3073503 1 2 1 29 25.15589569 0 95 7.3 -.25407675 -.3172096 1 3 1 29 25.15589569 0 98.75 . 3.066324 .3035415 2 1 0 39 54.55568942 0 96.66666666666667 . -.6136905 .10374988 2 2 0 39 54.55568942 0 91.33333333333333 7.442 -.6163323 -.27824256 2 3 0 39 54.55568942 0 98 7.814666667 -.3911197 -.2422454 4 2 0 38 21.06263959 0 . 6.55 -.3379536 -.3029306 4 3 0 38 21.06263959 0 . 7.15 1.1556487 -.2357633 5 1 0 31 . 0 . . -.50372595 . 6 1 0 40 17.5432526 0 71 4.7 -.37295735 .0023030285 6 2 0 40 17.5432526 0 67.66666666666667 5.95 -.018627167 -.29787156 6 3 0 40 17.5432526 0 73.66666666666667 . -.20520365 -.2924929 7 1 1 41 35.15625 1 89.66666666666667 7.1 -.4858939 .04625331 7 2 1 41 35.15625 1 86.66666666666667 6.697333333 -.26101145 -.3174112 7 3 1 41 35.15625 1 95.33333333333333 . 4.1877637 -.08966266 8 1 0 37 25.23634033 0 87.33333333333333 7.9 -.5304741 -.04076392 8 2 0 37 25.23634033 0 78.33333333333333 6.1 -.434379 -.309964 8 3 0 37 25.23634033 0 77.33333333333333 8.05 -.08566263 -.25711867 9 1 1 39 33.25488986 0 77.33333333333333 7.05 -.3980543 -.00615445 9 2 1 39 33.25488986 0 73.33333333333333 6.5 -.18737157 -.29306722 9 3 1 39 33.25488986 0 97 9.9 6.701427 .54593694 10 1 0 37 24.6097337 0 80.33333333333333 5.9 -.4000357 .04421359 10 2 0 37 24.6097337 0 81.33333333333333 6 -.21544057 -.25934732 10 3 0 37 24.6097337 0 83.66666666666667 6.3 -.008390245 -.305451 11 1 0 39 24.30461788 0 75.66666666666667 5.3 -.53344613 .07865868 11 2 0 39 24.30461788 0 70.33333333333333 . -.53707856 -.3097735 11 3 0 39 24.30461788 0 75.66666666666667 6.4 -.1682186 -.27875698 13 1 0 36 22.4996371 0 83.33333333333333 6.8 -.3815431 .00715128 13 2 0 36 22.4996371 0 73.66666666666667 6.65 -.13816822 -.2855877 13 3 0 36 22.4996371 0 68.33333333333333 8.85 4.111152 .9033498 14 1 0 46 26.5625 0 81.66666666666667 6.8 -.4941495 -.13494419 14 2 0 46 26.5625 0 79.33333333333333 7.7 -.373948 . 14 3 0 46 26.5625 0 76 7.1 .7025816 -.1696765 15 1 0 34 32.10720958 0 88 . -.6093976 -.09368258 15 2 0 34 32.10720958 0 79.33333333333333 . -.52684164 -.3123173 15 3 0 34 32.10720958 0 90 . .14912653 -.3024947 17 1 0 40 27.00513097 1 84.33333333333333 6.65 -.4865543 .0984958 17 2 0 40 27.00513097 1 82 7.2 -.3815431 -.2449288 17 3 0 40 27.00513097 1 99.33333333333333 6.1 -.13915884 -.28574044 18 1 0 35 24.10694088 0 64.66666666666667 6.75 -.4115935 -.16467524 18 2 0 35 24.10694088 0 70.66666666666667 6.6 -.3775805 -.3052855 18 3 0 35 24.10694088 0 67.33333333333333 6.75 .1554008 -.22982918 19 3 0 40 27.88518739 0 92.33333333333333 6.6 -.05924468 -.25337964 20 1 0 41 20.28240971 0 71.33333333333333 5.2 -.4307465 .8040594 20 2 0 41 20.28240971 0 65.33333333333333 5.25 -.4267838 -.27968565 20 3 0 41 20.28240971 0 75.33333333333333 5.5 .4985033 -.19184238 23 1 0 36 25.0995016 0 84.66666666666667 . -.5978398 .41634265 23 2 0 36 25.0995016 0 84.33333333333333 7.5 -.42876515 -.2650159 24 1 0 37 18.59012493 0 68 6.2 -.3574368 -.05839132 24 2 0 37 18.59012493 0 74 . -.05197978 -.3012516 24 3 0 37 18.59012493 0 76.88888888 5.25 2.592122 -.17694044 27 1 0 39 30.50508507 1 87.66666666666666 . -.4726849 -.1043352 27 2 0 39 30.50508507 1 91.66666666666666 6.7 -.4172074 -.3009494 27 3 0 39 30.50508507 1 88.83333333333333 6.75 -.09986226 -.3029617 28 1 0 36 18.77834467 0 69.66666666666667 5.4 -.3524835 .06102021 28 2 0 36 18.77834467 0 85.33333333333333 5.166666667 -.23129132 -.3130392 28 3 0 36 18.77834467 0 78.16666666666667 6.25 .02661346 -.3232161 29 1 0 37 23.63281255 1 78 7.15 -.4419741 -.19482003 29 2 0 37 23.63281255 1 85 5.45 -.3779107 -.301454 29 3 0 37 23.63281255 1 84.66666666666667 6.475 .1950276 -.15213487 31 1 0 36 21.60410478 0 83.33333333333333 5.962 -.4664107 .05515991 31 3 0 36 21.60410478 0 82.83333333333333 5.6 1.515923 -.20182908 32 1 0 38 26.77706407 0 79.66666666666667 6.55 -.54995733 -.13579708 32 2 0 38 26.77706407 0 82.66666666666667 6.2 -.3353118 -.3085924 32 3 0 38 26.77706407 0 78 6.35 .6946563 -.13677949 33 1 0 38 32.88888889 1 74 7.85 -.3194611 -.04061984 33 2 0 38 32.88888889 1 86 7.8 -.37692 -.30236775 33 3 0 38 32.88888889 1 76.66666666666667 . .11049034 -.23288435 34 1 0 33 25.99591237 0 86.66666666666667 6.3 -.3455488 .19505447 34 2 0 33 25.99591237 0 86 7.3 .010762734 -.26586282 34 3 0 33 25.99591237 0 90.66666666666667 8.25 1.7318892 .19765627 35 1 0 42 38.32001657 1 87.33333333333333 . -.6100581 .9908481 35 3 0 42 38.32001657 1 78.33333334666666 . -.018296935 -.3013093 36 1 0 36 21.92687484 0 84.33333333333333 5.966666667 -.6117092 .2410784 36 2 0 36 21.92687484 0 76.33333333333333 5.833333333 -.50603753 -.3125821 36 3 0 36 21.92687484 0 75 6.387 -.3280469 -.30805385 38 1 0 31 30.83653053 0 89.66666666666667 8.4 -.54929686 .06234656 38 2 0 31 30.83653053 0 101.33333333333333 7.85 -.4944797 -.3068409 38 3 0 31 30.83653053 0 95.16666666666667 . 1.1536673 -.06227478 39 1 0 26 20.22790628 0 . 5 -.50075394 .07180576 39 2 0 26 20.22790628 0 . 5.55 -.04240326 -.3112041 40 2 0 43 20.33672338 0 89 5.85 .3733485 -.3101761 40 3 0 43 20.33672338 0 80.16666666666667 5.2 1.2183913 -.28347412 41 1 0 37 22.9 0 74 . -.456504 . 42 1 0 42 23.80869017 0 80.66666666666667 6.564 -.3438976 -.0020568385 42 2 0 42 23.80869017 0 83.33333333333333 6.3 -.3613995 -.29500842 42 3 0 42 23.80869017 0 73.66666666666667 6.8 .20757617 -.2118544 43 1 0 33 26.75 0 95.66666666666667 . -.57670546 . 44 1 0 37 30.87360693 0 72 6.35 -.484573 .52756953 44 2 0 37 30.87360693 0 70.5 7.2 -.3138473 -.30360615 45 1 0 39 24.79963244 0 83.33333333333333 6.504 -.4274443 -.14511436 45 2 0 39 24.79963244 0 85 7.8 -.468392 -.28935882 45 3 0 39 24.79963244 0 93.33333333333333 7.2 .07053323 -.3061145 46 1 0 40 21.96712018 0 78.66666666666667 5.65 -.2256775 -.020348873 46 2 0 40 21.96712018 0 72 . -.162935 -.3131802 46 3 0 40 21.96712018 0 72.88888888666666 7.3 1.6589098 -.29485402 47 1 0 38 23.03004535 0 105.66666666666667 6.309 -.459476 .06723389 47 2 0 38 23.03004535 0 97.33333333333333 5.3 -.3336607 -.28034976 48 1 0 40 21.92687484 0 . 7 -.56316626 .8659224 48 2 0 40 21.92687484 0 . 5.8 -.18472977 -.3192273 end label values race_bin race_bin label def race_bin 0 "White or other", modify label def race_bin 1 "Black", modify
As an aside, I did use multiple imputation to deal with some missing data although I don't think it's relevant to my specific question. I will however include the code here for the sake of completeness.
Code:
mi set wide mi register imputed clinicMAP cfpwv mi register regular age bmi_pre_preg race_bin std_* id Trimester PET mi impute mvn clinicMAP cfpwv = age race_bin Trimester PET, add(25) rseed(12345)
Code:
mi xtset Trimester mi estimate, or post: quietly xtlogit PET std_PAPPA2ngmL age bmi_pre_preg race_bin clinicMAP std_spRatio cfpwv
Can you estimate a risk ratio after xtlogit rather than the odds ratio? I'm not certain that is easy to calculate but I thought I would ask if such a thing is possible using a post-estimation command or something else.
My thanks for any assistance than can be provided and apologies in advance for rather convoluted setup.
Much obliged,
Christopher
Comment