Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Testing difference in difference between concentration indices

    Hello Stata Experts,

    I have used "conindex" in Stata 15.1 to estimate concentration indices for control and treatment groups at baseline and endline. Is there some way that I can test the difference in difference between the groups directly?

    Alternatively, I have prepared a summary table (below) but am not sure how to proceed.
    Code:
    survey    treatment    number    ci    se
    0    0    490    -.021404    .083136
    1    0    501    -.012797    .041069
    0    1    487    -.065605    .041537
    1    1    500    -.030064    .046663
    Here
    HTML Code:
    survey refers to baseline and endline (0,1);
    treatment refers to control and treatment groups (0,1);
    number refers to group frequency
    ci refers to the concentration index
    se refers to standard errors for the index
    ​​​​​​​
    I would appreciate your suggestions.

    ​​​​​​​Thank you
    Deepali
    Deepali Godha

  • #2
    Hello,

    I will request some guidance on this.

    Thank you
    Deepali
    Deepali Godha

    Comment


    • #3
      I don't think it can be done with the data shown in your table. If I understand your situation correctly, there is a single group of people (or firms, or whatever they are) who receive treatment and another group of controls, and that these same people are surveyed at baseline and end of study. If that is the case, then the data shown in the table provides no information about the intraclass (intra-person or whatever the unit of observation is) correlation of the con variable, so it is impossible to calculate a standard error for the difference in differences.

      If, however, the people (or whatever entities they are) surveyed at baseline are different from the ones surveyed at end of study, then they can be treated as independent samples (i.e. intraclass correlation = 0) and a calculation is possible. If that is the case, post back and I'll explain how it can be done.

      Comment


      • #4
        Many thanks for your response Clyde.

        The data comes from two cross-sections done at baseline and endline in control and treatment groups. So, they are not the same people. I am sharing a sample of the data below.

        Code:
        * Example generated by -dataex-. To install: ssc install dataex
        clear
        input float(psu survey v191 y treatment cie0wlthat1 cie1wlthat1 cie0wlthat2 cie1wlthat2 ciew)
        24 0   3.121085 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        27 0  1.6431873 0 0 .01596596 .03123253 .01387447 .033817064 .01596596
        13 0  3.6666236 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        20 0 -4.0378942 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        76 0  -.8316973 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        61 0   5.319887 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        39 0   .4404058 5 0 .01596596 .03123253 .01387447 .033817064 .01596596
        39 0 -2.1093075 0 0 .01596596 .03123253 .01387447 .033817064 .01596596
        20 0  2.7967076 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        92 0  1.0351986 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        27 0   .8039176 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        27 0   .8800579 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        20 0  -2.373197 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        73 0  -2.678306 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        20 0  -3.652977 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        27 0 -2.3739955 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        13 0   5.930648 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        20 0 -1.0867404 3 0 .01596596 .03123253 .01387447 .033817064 .01596596
        76 0   .7209918 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        33 0  -3.485592 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        27 0  1.9102907 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        20 0  -.8042241 3 0 .01596596 .03123253 .01387447 .033817064 .01596596
        39 0  1.0882428 0 0 .01596596 .03123253 .01387447 .033817064 .01596596
        61 0 -4.2872047 3 0 .01596596 .03123253 .01387447 .033817064 .01596596
        33 0   2.610747 3 0 .01596596 .03123253 .01387447 .033817064 .01596596
        13 0  1.8789898 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        76 0   4.268822 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        13 0  -.6212404 3 0 .01596596 .03123253 .01387447 .033817064 .01596596
        24 0  -4.681873 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        92 0   5.139113 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        92 0 -1.0441327 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        13 0   2.917511 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        13 0   6.707578 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        39 0 -.09711995 3 0 .01596596 .03123253 .01387447 .033817064 .01596596
        24 0 -2.8406336 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        61 0   .4944743 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        92 0   2.939781 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        13 0  -3.633866 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        61 0  1.4710413 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        76 0   1.156263 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        76 0   .7924036 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        27 0  1.5119557 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        33 0  .19950327 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        92 0  -1.767644 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        61 0  -3.458547 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        76 0 -1.4278573 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        24 0   .5468257 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        27 0   -2.85815 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        73 0  1.4473692 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        33 0   -3.98892 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        27 0  .50260174 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        76 0 -1.2594385 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        27 0  .11189327 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        27 0 -4.1956873 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        39 0   1.201981 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        92 0  -.8703437 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        76 0  4.1135798 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        73 0  -1.321265 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        27 0   .4007107 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        24 0  1.9736477 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        61 0  -.4987681 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        92 0   .5415369 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        24 0 -2.0724776 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        20 0  -3.342299 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        73 0  -3.057787 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        13 0   .7007588 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        24 0   6.780854 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        92 0 -2.3705966 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        39 0 -3.9017596 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        20 0   1.035106 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        13 0   -.342652 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        13 0  -3.338341 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        76 0  -1.404459 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        20 0   .8744676 3 0 .01596596 .03123253 .01387447 .033817064 .01596596
        13 0  1.2849166 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        61 0   2.460629 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        20 0   .2955512 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        33 0 -2.6721916 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        20 0  1.3164234 1 0 .01596596 .03123253 .01387447 .033817064 .01596596
        13 0   3.550049 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        39 0 -2.3721876 2 0 .01596596 .03123253 .01387447 .033817064 .01596596
        16 0 -1.4415892 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        70 0   .9576371 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        94 0  -2.393618 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        94 0  1.7621137 4 1 .01596596 .03123253 .01387447 .033817064 .03123253
        58 0    1.48437 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        94 0  -.6432994 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        99 0 -2.1045442 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        16 0 -3.5250366 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        70 0 -.10005847 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        70 0  -2.516538 0 1 .01596596 .03123253 .01387447 .033817064 .03123253
        77 0  2.1643856 3 1 .01596596 .03123253 .01387447 .033817064 .03123253
        99 0   .9025438 3 1 .01596596 .03123253 .01387447 .033817064 .03123253
        94 0  4.0171194 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        22 0   6.049921 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        94 0  -.8715411 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        94 0 -2.0070422 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        22 0   .8417259 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        16 0 -2.4493046 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        58 0 -2.2962272 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        94 0  4.0286283 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        94 0   4.319527 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        58 0   .7954695 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        99 0 -3.3504226 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        16 0 -3.5358884 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        70 0  -1.382227 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        94 0  -3.388977 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        77 0  -.9984236 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        58 0   -.647365 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        16 0   .8113775 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
         3 0  1.2570506 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        16 0  -.5038604 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        99 0 -2.1573272 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        99 0   1.055568 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        16 0 -3.5540626 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
         2 0  -.8131843 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        77 0 -2.8173695 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        22 0   7.901647 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
         2 0 -3.5774846 3 1 .01596596 .03123253 .01387447 .033817064 .03123253
        58 0   3.407229 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        58 0  -1.291897 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        58 0 -1.6836997 0 1 .01596596 .03123253 .01387447 .033817064 .03123253
        94 0 -2.9167125 3 1 .01596596 .03123253 .01387447 .033817064 .03123253
         3 0   6.268818 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        70 0 -2.2321875 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        70 0   -2.80722 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        77 0   7.064415 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
         3 0 -3.1232684 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        58 0  4.3453856 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        70 0   -1.27866 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        77 0   .8154472 3 1 .01596596 .03123253 .01387447 .033817064 .03123253
         3 0 -1.1472385 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        58 0   .6456611 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        99 0    1.86681 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
         3 0 -2.5518494 3 1 .01596596 .03123253 .01387447 .033817064 .03123253
        77 0  -.2355954 3 1 .01596596 .03123253 .01387447 .033817064 .03123253
         2 0 -1.5020964 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
         3 0 -1.7901163 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        77 0   5.233785 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        16 0 -1.2399393 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        94 0  1.0219984 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
         2 0 -2.0013905 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
         2 0 -3.2100105 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        70 0 -1.9207485 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        70 0 -2.9500096 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        99 0   3.348149 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        99 0  -.4840582 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        99 0  -2.735415 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        77 0  -1.523783 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
         2 0  -3.992497 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        22 0   .7237683 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        16 0 -.52830315 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        99 0 -1.6905556 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
         2 0   1.836318 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        58 0   .4950658 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
         3 0  -1.585862 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
         2 0  -.6506294 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
        94 0 -4.2697663 1 1 .01596596 .03123253 .01387447 .033817064 .03123253
         2 0 -2.2053716 2 1 .01596596 .03123253 .01387447 .033817064 .03123253
        76    1    -.785644    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        13    1    .3632063    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        61    1    1.0972507    0    0    .01596596    .03123253    .01387447    .033817064    .01387447
        39    1    -.4652394    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        39    1    -2.5324314    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        24    1    1.261604    3    0    .01596596    .03123253    .01387447    .033817064    .01387447
        33    1    6.978914    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        61    1    -1.375485    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        61    1    -3.724927    3    0    .01596596    .03123253    .01387447    .033817064    .01387447
        24    1    2.1255703    3    0    .01596596    .03123253    .01387447    .033817064    .01387447
        92    1    -3.340555    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        13    1    9.201441    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        92    1    1.0461868    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        27    1    .8399993    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        33    1    1.0471741    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        13    1    -2.313376    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        39    1    1.165004    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        33    1    1.0619268    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        27    1    -1.8327786    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        76    1    -.09029005    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        92    1    4.07654    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        27    1    -1.510049    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        13    1    9.199111    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        61    1    -.860099    0    0    .01596596    .03123253    .01387447    .033817064    .01387447
        20    1    -1.725699    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        33    1    4.4254866    0    0    .01596596    .03123253    .01387447    .033817064    .01387447
        24    1    -3.440553    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        92    1    -1.677831    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        73    1    -2.625788    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        24    1    -2.7292    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        92    1    1.366292    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        20    1    7.335363    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        39    1    1.347041    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        61    1    -1.7906402    0    0    .01596596    .03123253    .01387447    .033817064    .01387447
        76    1    -2.0360625    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        61    1    3.5861065    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        61    1    .51375866    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        33    1    .7640677    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        27    1    .004829166    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        13    1    3.750588    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        61    1    1.1524003    0    0    .01596596    .03123253    .01387447    .033817064    .01387447
        33    1    3.184297    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        33    1    4.1543837    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        13    1    4.3699117    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        27    1    .9295703    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        61    1    7.671578    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        13    1    -1.5351838    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        61    1    -2.407571    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        27    1    1.927863    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        27    1    4.776625    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        61    1    7.657144    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        61    1    -3.0810184    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        33    1    1.6968973    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        13    1    .84778    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        33    1    7.711828    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        39    1    -.9717904    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        24    1    7.202347    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        20    1    -2.777027    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        92    1    .8236838    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        73    1    1.1919045    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        73    1    1.2422683    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        13    1    -.6859643    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        73    1    .1833269    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        27    1    -1.673929    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        33    1    .8343645    3    0    .01596596    .03123253    .01387447    .033817064    .01387447
        24    1    2.2524295    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        13    1    .6066114    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        76    1    -3.606845    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        76    1    -.3409151    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        73    1    5.1383    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        13    1    -2.913332    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        13    1    -.1921681    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        27    1    -.2440644    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        92    1    -2.5585265    3    0    .01596596    .03123253    .01387447    .033817064    .01387447
        39    1    .1821722    1    0    .01596596    .03123253    .01387447    .033817064    .01387447
        73    1    -2.028095    2    0    .01596596    .03123253    .01387447    .033817064    .01387447
        24    1    -3.095426    3    0    .01596596    .03123253    .01387447    .033817064    .01387447
        16    1    -.19308896    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        22    1    6.590016    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        16    1    -.972397    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        3    1    1.0839405    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    2.9271295    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        58    1    .3148862    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        3    1    -.15278845    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        58    1    6.861259    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        99    1    1.5151125    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        70    1    3.255768    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        3    1    2.4708245    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        22    1    6.836051    4    1    .01596596    .03123253    .01387447    .033817064    .033817064
        16    1    1.142783    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        16    1    -.12093055    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        77    1    -.4922345    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        58    1    .8058907    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        16    1    -3.369668    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        16    1    .09662566    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        22    1    6.894584    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        58    1    1.9002726    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    1.3697127    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        3    1    .1837815    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        70    1    9.560533    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        2    1    7.459353    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        70    1    -2.3646212    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        58    1    1.546287    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        2    1    1.492123    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        58    1    -1.755069    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    -1.1031743    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        16    1    1.6748575    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        58    1    7.980913    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        70    1    1.9585283    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        3    1    4.967741    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    .6450933    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        77    1    -1.624604    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        2    1    -.3513538    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    1.0386485    0    1    .01596596    .03123253    .01387447    .033817064    .033817064
        2    1    8.884757    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        2    1    -.7782238    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    8.845203    0    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    .04960743    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    2.3548427    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        58    1    -.9157703    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        22    1    7.36027    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        22    1    7.052618    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        99    1    -3.521058    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    7.130834    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        22    1    1.5799227    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    -4.265681    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        3    1    1.0769595    0    1    .01596596    .03123253    .01387447    .033817064    .033817064
        58    1    6.332525    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        58    1    1.2386937    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        16    1    1.4306438    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        58    1    -.8705279    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    4.824669    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        2    1    -2.0688748    0    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    -2.8718026    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        3    1    -1.0462321    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        99    1    .4821611    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        2    1    -.9203275    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        22    1    5.285029    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        58    1    -2.585166    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    .19373475    4    1    .01596596    .03123253    .01387447    .033817064    .033817064
        2    1    2.1753597    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        3    1    -2.3770745    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        16    1    1.7160155    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        70    1    -1.4012792    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    1.1149513    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        77    1    -2.1469326    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        16    1    -.9257145    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    1.1244843    0    1    .01596596    .03123253    .01387447    .033817064    .033817064
        3    1    -4.242779    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        99    1    3.916662    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        70    1    -.423568    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        16    1    -2.504785    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        99    1    1.6916686    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        16    1    1.0344249    1    1    .01596596    .03123253    .01387447    .033817064    .033817064
        16    1    -1.8712468    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        3    1    1.3046467    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        70    1    1.771799    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        3    1    8.332636    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        58    1    4.770005    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        22    1    -2.326902    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        2    1    -1.5133033    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        16    1    1.2881117    3    1    .01596596    .03123253    .01387447    .033817064    .033817064
        94    1    -3.145335    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        3    1    -.6685748    2    1    .01596596    .03123253    .01387447    .033817064    .033817064
        end
        label values survey survey
        label def survey 0 "Baseline", modify
        label values treatment treatment
        label def treatment 0 "Control", modify
        I had tried to run the following commands on my whole dataset but I did not get the standard errors.
        Code:
        gen ciew=cie0wlthat1 if  treatment==0 & survey==0
        replace ciew=cie1wlthat1 if  treatment==1 & survey==0
        replace ciew=cie0wlthat2 if  treatment==0 & survey==1
        replace ciew=cie1wlthat2 if  treatment==1 & survey==1
        
        diff ciew, period(survey) treated(treatment) cluster(psu) robust
        Code:
        ------------------------------------------------------
         Outcome var.   | ciew    | S. Err. |   t   |  P>|t|
        ----------------+---------+---------+-------+---------
        Baseline        |         |         |       | 
           Control      | 0.016   |         |       | 
           Treated      | 0.031   |         |       | 
           Diff (T-C)   | 0.015   |    .    |    .  |    .
        Follow-up       |         |         |       | 
           Control      | 0.014   |         |       | 
           Treated      | 0.034   |         |       | 
           Diff (T-C)   | 0.020   |    .    |    .  |    .
                        |         |         |       | 
        Diff-in-Diff    | 0.005   |    .    |    .  |    .
        ------------------------------------------------------
        I will look forward to your solution.
        Best
        Deepali
        Deepali Godha

        Comment


        • #5
          I do not understand the organization of your data set. What does each observation represent? Each observation contains, apart from the derived variable ciew, four different cie* variables. This makes it appear as if each person was in both the control and treatment groups and was surveyed in both surveys--which contradicts what you have said. On top of that, the values of cie* do not vary across observations.

          Moreover, you show a variable called psu, which suggests you have a complex survey design--so what about stratification and sampling weights? Also, with a complex survey design, I do not know if it is even possible to calculate comparisons from summary statistics, and if it is, I don't know how to do it.

          But let's try to work towards doing the comparisons from individual response data. Do you have individual response data? Do you have the pweights and, if applicable, strata?

          Comment


          • #6
            Hello Clyde,

            Sorry for the confusion. Please ignore the 4 'cie*' variables. These are the Erreygers index (EI) for the control and treatment groups at baseline and endline for the outcome y. The 'ciew' variable has been created from the 'cie*' variables. I don't have any weights or strata. I would have liked to use the psu variable as it is some information and I have used it in creating the EIs.

            Anyways, coming to your main question- I don't have individual data on what I want. I want to know if the change in EI in control versus treatment areas between endline and baseline was significant. The Diff-in-Diff is estimated as .005 but I need to know if it significant. You had suggested in your post #3 that there is a possible solution if they are independent samples. I am hoping that your solution might work because they are independent samples not panel data.

            Thanks
            Deepali
            Deepali Godha

            Comment


            • #7
              Were it not for the complex sampling, I would show you how to do this. But I don't know how it is done in the presence of complex sampling, and even if I knew how, there is no question in my mind it would require knowledge of the pweights and strata (if any). So I'm afraid I'll have to retract my claim to being able to do this. If somebody else who is following the thread knows how, I hope he or she will chime in.

              Comment


              • #8
                Hello Clyde,

                Many thanks for all your support.

                Deepali
                Deepali Godha

                Comment

                Working...
                X