Dear all,
I have a dataset and I need to do a propensity score weighting analysis. I will appreciate if someone can help me write the code for my data. Here is the data codebook and data and my research question
id= patient ID
persistence = Treatment failure with data value 1= failure, 0 no failure
fad= feeding artery diameter 1 - 4 mm (continues variable
dva+ draining veindiameter 1-5 mm (continue variable)
age= continue variable
bmi= continue variable
gender = 1 female, 0 male (categorical variable)
coildistance= 1 and 0 (categorical variable)
coilpackdensity = 0, 1, 2 (categorical variable)
coilctdensity= continuous variable
fan = 1, 2, 3 (categorical variable)
dvn= 1, 2, 3, 4 (categorical variable)
coildiameter = continuous variable
coillength = continuous variable
RESEARCH QUESTION: We want to see in this retrospective study which of these factors have a significant association with persistence (treatment failure in our dataset). The editorial reviewer has pointed out that we need to perform propensity score weighting to limit bias in this retrospective analysis.
Appreciate your kind help experts.
I have a dataset and I need to do a propensity score weighting analysis. I will appreciate if someone can help me write the code for my data. Here is the data codebook and data and my research question
id= patient ID
persistence = Treatment failure with data value 1= failure, 0 no failure
fad= feeding artery diameter 1 - 4 mm (continues variable
dva+ draining veindiameter 1-5 mm (continue variable)
age= continue variable
bmi= continue variable
gender = 1 female, 0 male (categorical variable)
coildistance= 1 and 0 (categorical variable)
coilpackdensity = 0, 1, 2 (categorical variable)
coilctdensity= continuous variable
fan = 1, 2, 3 (categorical variable)
dvn= 1, 2, 3, 4 (categorical variable)
coildiameter = continuous variable
coillength = continuous variable
RESEARCH QUESTION: We want to see in this retrospective study which of these factors have a significant association with persistence (treatment failure in our dataset). The editorial reviewer has pointed out that we need to perform propensity score weighting to limit bias in this retrospective analysis.
Appreciate your kind help experts.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(id persistence fad dva age bmi gender coildistance coilpackdensity coilctdensity fan dvn coildiameter coillength) 1 0 2.0466151 1.0727593 82.06387 32.169147 1 1 1 940.6108 1 1 4.1464925 9.023077 2 0 1.800657 4.4835696 53.39509 25.64965 1 1 1 1102.0759 1 1 13.436086 23.17962 3 0 1.409939 3.8405955 44.72478 34.23431 1 1 1 2820.018 1 1 8.393341 22.934595 4 0 1.0856706 1.8232707 81.15219 43.38863 1 1 1 306.85385 1 1 7.815025 14.668766 5 0 3.6068 1.5338544 4.942043 46.97698 1 1 1 2585.5186 1 1 12.327294 23.25968 6 0 2.0525646 2.1040432 42.12594 34.03895 1 1 1 214.0319 1 1 11.98497 11.179538 7 0 1.2133152 3.608927 66.956345 38.77515 1 1 1 2330.383 1 1 14.23727 18.300987 8 0 1.970104 2.401072 67.86388 38.72332 1 1 1 3496.997 1 1 7.587428 13.254666 9 0 2.6653094 4.968778 72.224 26.146324 1 1 1 2045.7886 1 1 5.595563 13.261338 10 0 3.627973 1.0835547 84.60443 34.974476 1 1 1 2401.3467 1 1 6.839395 15.157294 11 0 1.6141285 2.475096 59.28709 41.47467 1 1 1 2574.778 1 1 8.658762 17.972809 12 0 3.678276 2.819416 73.28707 30.044584 1 1 1 1127.1844 1 1 5.769028 13.495384 13 0 2.7533975 1.5505 24.620996 46.77285 1 1 1 304.5713 1 1 4.549625 16.254982 14 0 2.1093373 3.347127 34.30736 25.586575 1 1 1 1913.5685 1 1 8.74785 14.09864 15 0 3.551893 3.3939574 20.26483 26.7304 1 1 1 2684.9314 1 1 5.032732 24.31683 16 0 2.1741457 1.0824169 13.283463 45.58894 1 1 1 1499.964 1 1 11.472352 13.635483 17 0 1.358984 3.502086 49.24876 34.060932 1 1 1 1563.4974 1 1 3.8087604 6.50173 18 0 3.2627304 1.974216 65.8294 25.40716 1 1 1 2762.214 1 1 5.539359 11.542585 19 0 3.08507 3.356706 29.45748 43.03842 1 1 1 1722.549 1 1 6.420884 11.42582 20 0 3.059846 2.445556 37.635345 31.99965 1 1 1 3201.758 1 1 9.727693 10.10471 21 0 3.795804 2.2853076 83.34341 30.416555 1 1 1 3348.736 1 1 11.900975 20.49668 22 0 2.3646646 4.873831 9.715034 30.77836 1 1 1 1909.1965 1 1 14.652493 15.741392 23 0 1.2022033 4.225455 74.51496 39.11475 1 1 1 1458.0203 1 1 3.708398 6.65646 24 0 2.0139666 3.768298 82.10403 20.68366 1 1 1 1157.9535 1 1 10.035596 22.5809 25 0 3.9246545 4.622593 86.83253 38.87665 1 1 1 2444.032 1 1 7.87583 14.526452 26 0 3.179315 4.5390654 9.4452505 24.333126 1 1 1 2896.768 1 1 13.513108 12.984633 27 0 1.1362454 4.1821556 30.280233 31.09205 1 1 1 2977.052 1 1 14.531435 8.879949 28 0 3.2379 2.493448 41.28088 34.79865 1 1 1 482.4401 1 1 6.396618 23.12194 29 0 2.4883776 2.655082 46.38823 45.56448 1 1 1 2045.985 1 1 3.544082 8.043025 30 0 3.1501486 4.917648 32.24629 37.43239 1 1 1 1058.1903 1 1 9.252351 7.325188 31 0 3.579226 2.8685324 41.79453 45.73599 1 1 1 1671.3654 1 1 9.949808 22.02782 32 0 1.4022267 2.433068 76.33636 25.06561 1 1 1 1298.697 1 1 6.153462 9.174955 33 0 2.4653256 3.8196795 78.25071 23.75514 1 1 1 3145.945 1 1 9.311392 13.521233 34 0 3.613656 3.19629 54.70331 44.4105 1 1 1 2002.4724 1 1 5.386034 20.942364 35 0 3.299405 2.866741 12.549586 28.18543 1 1 1 2727.428 1 1 13.261002 23.57783 36 0 1.7537667 3.238541 84.92246 23.73642 1 1 1 3333.407 1 1 9.609053 13.507523 37 0 1.4990944 1.5306416 83.2951 21.153913 1 1 1 274.9186 1 1 13.942122 17.639622 38 0 3.2313874 1.385616 7.327031 21.557156 1 1 1 2889.8806 1 1 4.5539784 8.578413 39 0 3.941534 3.4137645 48.24412 23.722546 1 1 1 2582.954 1 1 4.868631 21.28541 40 0 3.188732 1.1702436 66.753075 39.28724 1 1 1 194.38564 1 1 10.11143 17.652695 41 0 3.703315 1.4104966 45.85284 28.62164 1 1 1 1238.8912 1 1 8.891297 16.074623 42 0 1.7930948 4.926879 85.65374 25.35861 1 1 1 362.1319 1 1 13.891647 23.6171 43 0 3.656953 3.168889 12.044868 19.043467 1 1 1 2879.082 1 1 11.033825 12.52147 44 0 3.646336 3.187867 40.03852 35.562107 1 1 1 1533.663 1 1 11.95592 18.309465 45 0 3.246799 4.6297626 43.1028 34.78592 1 1 1 3038.625 1 1 13.58052 5.993292 46 0 3.758879 1.4232484 74.28586 44.54094 1 1 1 2048.8027 1 1 13.03799 13.144187 47 0 3.08036 3.055595 60.721 25.9962 1 1 1 684.238 1 1 5.994171 24.25169 48 0 1.6462077 2.4277906 49.74657 46.51963 1 1 1 1713.7333 1 1 14.190813 11.05677 49 0 3.485767 1.0740141 22.45365 45.96863 1 1 1 2678.285 1 1 4.249101 10.850106 50 0 1.1326461 4.4709487 67.710815 44.57111 1 1 1 2726.6055 1 1 12.214122 24.67234 51 0 3.589113 1.575858 45.52984 44.06512 1 1 1 1025.5399 1 1 3.597705 7.926706 52 0 2.0578136 2.4947436 47.86433 40.4409 1 1 1 309.2011 1 1 6.136027 7.376064 53 0 3.31612 4.846127 33.349735 43.04809 1 1 1 2382.4016 1 1 5.508844 5.944766 54 0 2.75836 1.0137633 14.601688 36.71173 1 1 1 1187.976 1 1 10.60372 22.42463 55 0 1.96833 4.780848 15.160126 19.34856 1 1 1 2324.8015 1 1 3.368087 20.82728 56 0 1.518792 4.630314 71.94684 19.725487 1 1 1 633.1784 1 1 8.185226 10.388652 57 0 3.416093 1.959773 59.25359 25.22342 1 1 1 1381.958 1 1 11.014404 13.955753 58 0 1.9180057 3.071691 7.543527 39.71751 1 1 1 1279.169 1 1 4.991954 19.862156 59 0 1.657299 4.287744 11.59068 19.046635 1 1 1 200.3193 1 1 8.700238 10.46738 60 0 3.174193 3.6385756 82.42748 26.973026 1 1 1 3053.622 1 1 14.713136 9.458555 61 0 3.08946 3.490764 57.74321 23.943514 1 1 0 225.77693 1 1 8.479272 8.157181 62 0 3.7358034 1.737532 33.669895 46.13056 1 1 0 1334.7058 1 1 14.038713 17.945646 63 0 3.03869 4.3568625 86.44584 36.271423 1 1 0 3403.7356 1 1 14.112348 24.389307 64 0 2.0648248 2.937864 32.25342 36.43229 1 1 0 322.4928 1 1 7.319659 15.806625 65 0 3.21691 3.578959 63.81904 20.5751 1 1 0 1526.017 1 1 8.433202 20.271057 66 0 1.562205 1.1385428 41.0896 47.34361 1 1 0 2587.993 1 1 12.27519 8.907362 67 0 1.9438385 3.992995 67.094444 41.69146 1 1 0 1567.0778 1 1 8.6899185 16.496862 68 0 1.412708 1.3583837 17.814684 32.960297 1 1 0 2384.103 1 1 14.07622 5.619126 69 0 2.9613216 2.445017 48.33884 42.40149 1 1 0 1525.706 1 1 3.349097 23.73421 70 0 1.810396 3.4504094 38.82619 41.19428 1 1 0 1637.8932 1 1 5.884855 17.824127 71 0 3.699518 2.9877276 26.02632 42.13657 1 1 0 2658.6704 1 1 4.0527234 23.99652 72 0 2.72027 1.061206 11.28696 39.65406 1 1 0 2252.8164 1 1 7.355754 13.276464 73 0 1.334411 3.170879 9.066655 24.65746 1 1 0 684.778 1 1 7.72848 5.051293 74 0 2.2435682 1.1816491 68.395134 45.60717 1 1 0 1716.9342 1 1 9.994546 17.864813 75 0 1.0091566 2.9077704 75.92172 26.70236 1 1 0 1427.641 1 1 9.499992 15.1513 76 0 2.9979935 3.723669 27.935396 22.517414 1 1 0 2276.4763 1 1 4.6658764 15.43947 77 0 2.0388627 3.898715 78.22996 42.91253 1 1 0 1656.811 1 1 6.017672 11.390137 78 0 1.2340704 3.9551046 9.304252 31.482386 1 1 0 2107.8013 1 1 5.159348 19.1118 79 0 1.382744 3.7538846 33.920177 41.40616 1 1 0 628.866 1 1 3.357114 5.610768 80 0 1.6891017 2.5298126 46.98319 19.334034 1 1 0 983.4181 1 1 4.0537524 20.236866 81 0 1.988664 4.1830688 16.720108 38.92228 1 1 0 3393.928 1 1 5.850822 15.326195 82 0 2.2432268 2.8343616 68.991974 23.20119 1 1 0 3007.825 1 1 13.160172 5.884528 83 0 1.1082542 4.5063453 22.615753 39.46856 1 1 0 1843.1068 1 1 3.889771 22.77623 84 0 1.2531433 3.1252704 18.546448 34.44354 1 1 0 2507.482 1 1 7.321298 22.38238 85 0 1.0296288 2.834403 57.27089 36.25444 1 1 0 1066.4701 1 1 11.98298 24.06184 86 0 1.960131 4.1008334 19.136856 46.08819 1 1 0 3399.697 1 1 10.263528 15.648092 87 0 1.0155909 3.075825 23.39118 45.44609 1 1 0 1846.6006 1 1 8.54985 18.229868 88 0 1.6826304 4.0154004 10.728559 41.14787 1 1 0 1393.0275 1 1 7.332288 19.352715 89 0 3.554404 1.740871 42.59151 29.412436 1 1 0 3371.4304 1 1 5.937517 19.72873 90 0 3.94602 3.6321285 78.6673 20.70001 1 1 0 2678.3596 1 1 10.184987 7.610866 91 1 1.0974375 1.6323186 65.6456 25.69063 1 1 0 980.8626 1 1 6.313339 15.56778 92 1 3.962454 4.6927357 45.56488 20.958796 1 1 0 924.1556 1 1 8.136326 15.017647 93 1 3.682318 2.593901 56.85702 44.52927 1 1 0 307.4711 1 1 12.944544 19.760937 94 1 3.90542 1.0209105 50.76731 24.824913 1 1 0 2939.783 1 1 12.59472 22.69975 95 1 1.7176608 4.2462473 73.192245 42.90976 1 1 0 2089.6155 1 1 14.514643 23.67602 96 1 3.078201 1.7055124 78.51747 31.635265 1 1 0 3328.454 1 1 9.341699 23.7888 97 1 2.4653075 1.1318177 58.66352 24.605576 1 1 0 2658.49 1 1 6.611665 16.48108 98 1 2.3129356 1.8130003 50.51954 39.90788 1 1 0 1939.1893 1 1 11.609186 14.6497 99 1 2.7574015 1.840588 53.16927 47.77684 1 1 0 1401.6908 1 1 4.338856 9.000147 100 1 2.1361277 2.622005 73.50728 21.67079 1 1 0 3128.766 1 1 3.124304 24.332966 end
Comment