To do this, I thought of generating a new variable, which equals the variables in the final specification and adding this new variable to each of the first four specifications to ensure the samples are the same. I'm not sure, but would it look something like:
Code:
generate fixed2 = faith2 + at3 + attend_diff + hgage1 + hgage2 + agediff + esbrd1 + esbrd2 + child + linc
Code:
if fixed2 == 1
Here's an example of my data:
Code:
input byte(faith2 at3) float attend_diff int(hgage1 hgage2) byte(agediff esbrd1 esbrd2) float child byte linc 2 0 0 49 48 1 3 1 2 10 2 0 0 50 49 1 1 1 2 9 2 0 0 51 50 1 1 1 2 10 2 0 0 52 51 1 1 1 2 10 6 0 0 48 38 10 1 1 3 9 6 0 0 49 39 10 1 1 3 9 6 0 0 50 40 10 1 1 3 9 6 0 0 51 41 10 1 1 3 8 1 0 0 20 22 2 2 3 . 9 1 0 0 30 23 7 . 1 . 11 1 0 0 31 24 7 1 1 . 11 1 0 0 32 25 7 1 3 . 11 1 0 0 33 26 7 1 1 . 11 1 0 0 34 27 7 1 1 . 10 1 0 0 35 28 7 1 1 . . 1 0 0 36 29 7 1 1 . 11 1 0 0 37 30 7 1 3 . 11 1 0 0 38 31 7 1 2 . 11 1 0 0 39 32 7 1 3 . 11 3 0 0 47 44 3 1 1 . 11 3 0 0 48 45 3 1 1 . 11 3 0 0 49 46 3 1 1 . 11 3 0 0 50 47 3 1 1 . 11 3 0 0 51 48 3 1 1 . 11 3 0 0 52 49 3 1 1 . 11 3 0 0 53 50 3 1 1 . 11 3 0 0 54 51 3 1 1 . 11 end
Stata v.15.1.
0 Response to Fixing a sample so observations between specifications are the same to enable comparisons
Post a Comment