I am involved in a project looking at net use in preventing malaria. I have a dataset containing the computed probabilities of certain events as described in the dataset below. They are in continuous form. I wish to calculate the conditional probability of having fever given the rate of net use for the month (varname netuse), the probabilty of having the house sprayed (varname spray) and the prevalence of fever for the month (fever). How can I achieve this?
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int year float month byte district float(netuse fever spray) 2016 5 9 .2726605 .3488717 .6880603 2016 4 10 .7239472 .2668857 .9794578 2016 2 9 .7955464 .1366463 .6701937 2016 2 9 .8925074 .028556867 .5948808 2016 3 9 .7078791 .8689333 .7970893 2016 8 9 .365269 .3508549 .7835853 2016 1 9 .9310499 .07110509 .6546342 2016 7 9 .6216809 .32336795 .09688907 2016 4 9 .8004354 .5551032 .6885059 2016 5 9 .4798372 .875991 .872496 2016 10 9 .14294797 .20470947 .52963525 2016 4 9 .8343448 .8927587 .8302209 2016 11 31 .3431251 .5844658 .9339853 2016 2 31 .5906867 .3697791 .1749891 2016 7 31 .32953 .8506309 .5536171 2016 2 31 .6996295 .3913819 .5346152 2016 4 31 .8142969 .11966132 .7767794 2016 3 31 .3429726 .7542434 .1288747 2016 11 55 .10796808 .6950234 .27751842 2016 10 55 .9671743 .6866152 .4242016 2016 8 45 .1285523 .9319346 .13590056 2016 6 45 .7578536 .4548882 .3325624 2016 2 13 .25002995 .0674011 .4675523 2016 9 61 .9269138 .3379889 .51608807 2016 4 61 .7118431 .9748848 .06694305 2016 7 61 .17967154 .7264384 .07229638 2016 9 61 .45065185 .04541512 .6817465 2016 5 61 .1946068 .7459667 .08804953 2016 6 61 .7135741 .4961259 .13270818 2016 8 61 .24531136 .7167162 .8745816 2016 7 23 .7672456 .859742 .2468877 2016 9 23 .3653557 .13407555 .043255 2016 11 23 .27069142 .48844185 .3764437 2016 10 23 .9911318 .8712187 .7677861 2016 3 23 .6851298 .7664683 .7551366 2016 4 23 .5027668 .25125554 .4476188 2016 9 72 .6903818 .16636477 .4087105 2016 4 72 .8636012 .7437958 .29777426 2016 6 72 .0404633 .9805113 .6794177 2016 11 3 .1842219 .7295772 .7124024 2016 11 16 .4198807 .9011049 .56622654 2016 4 16 .6475499 .26436493 .1778325 2016 9 16 .9103145 .8856509 .11399896 2016 7 16 .6809221 .882112 .5955869 2016 9 16 .8568827 .748933 .6251604 2016 6 16 .06420179 .9196262 .634899 2016 8 16 .8390664 .6934533 .9944572 2016 5 16 .6208202 .2154026 .7497677 2016 7 16 .4041756 .8285888 .1736788 2016 11 52 .9786366 .04421536 .6107705 2016 9 52 .36276805 .8630378 .5754215 2016 6 52 .31382445 .3526046 .3678161 2016 6 76 .6380712 .7720399 .3005246 2016 7 76 .18699375 .5861199 .007538023 2016 5 76 .50534767 .3227766 .6701369 2016 11 76 .5276305 .17293066 .4241406 2016 7 76 .7853414 .8053644 .9537622 2016 1 76 .4717338 .3060019 .08674778 2016 7 76 .2299842 .21909967 .8949648 2016 8 76 .7976828 .724731 .5890286 2016 10 76 .16493952 .6964867 .4005832 2016 8 76 .932945 .9119344 .6654902 2016 2 76 .3999315 .6795634 .4198386 2016 12 76 .9881987 .3549416 .7472054 2016 10 76 .9287856 .73897 .7190143 2016 7 76 .6640378 .18740167 .8464647 2016 8 76 .036803816 .3146128 .7908313 2016 4 76 .3336498 .1375693 .1900222 2016 8 76 .7824295 .6537739 .3869604 2016 8 76 .01700492 .27013195 .23871335 2016 6 76 .2278204 .8998394 .3447002 2016 10 76 .57824653 .5734232 .7795682 2016 9 76 .7533595 .11147037 .7484396 2016 9 76 .8570072 .4145227 .23037836 2016 5 76 .9322746 .003052204 .16770323 2016 5 76 .324447 .6659978 .9180508 2016 9 76 .1637711 .3462876 .3138996 2016 12 2 .958201 .0780235 .9019141 2016 10 17 .6008608 .12758136 .07740517 2016 11 17 .9733476 .2297006 .6341382 2016 7 17 .2363827 .3295547 .8147295 2016 11 17 .6764786 .4144089 .8788922 2016 4 17 .14591032 .036084738 .02599352 2016 10 17 .29664016 .08438109 .17993 2016 2 17 .8219558 .009876247 .57788956 2016 11 17 .3213928 .3200437 .4081415 2016 5 17 .4164997 .005196966 .6155495 2016 4 17 .02369639 .22754347 .17457695 2016 10 17 .3125404 .851468 .3617646 2016 4 74 .9322619 .9820066 .1338996 2016 9 74 .0502046 .032479186 .001363096 2016 3 74 .6221892 .9874847 .25710005 2016 3 74 .6189114 .894106 .6517417 2016 6 44 .9028944 .9684734 .9252081 2016 11 44 .3830579 .23922028 .8233367 2016 1 44 .35137045 .6927336 .9229402 2016 3 74 .6978495 .4884359 .7480426 2016 7 74 .7828125 .4376452 .52141476 2016 9 74 .8312564 .5858005 .4022151 2016 7 74 .8498105 .3787092 .8681989 end label values district district_id label def district_id 2 "Bambey", modify label def district_id 3 "Bignona", modify label def district_id 9 "Dakar-nord", modify label def district_id 10 "Dakar-ouest", modify label def district_id 13 "Diameniadio", modify label def district_id 16 "Diouloulou", modify label def district_id 17 "Diourbel", modify label def district_id 23 "Guédiawaye", modify label def district_id 31 "Keur Massar", modify label def district_id 44 "Mbacké", modify label def district_id 45 "Mbao", modify label def district_id 52 "Oussouye", modify label def district_id 55 "Pikine", modify label def district_id 61 "Rufisque", modify label def district_id 72 "Thionck-Essyl", modify label def district_id 74 "Touba", modify label def district_id 76 "Ziguinchor", modify
0 Response to Calculating conditional probabilities in Stata with continuous data
Post a Comment