Hello,
I have what I hope is a simple query but I couldn't find the answer I was looking for online or in prior forum posts. I'm using Stata 18.
I want to generate a 2x2 table of the variable fin against arrest, but with the coding as it is, I will not have 1,1 in the top left cell as I would like.
Is there an easy, temporary way to switch the code for tabulate without having to generate different variables or change the coding of the current variables?
Thanks very much!
------------------ copy up to and including the previous line ------------------
I have what I hope is a simple query but I couldn't find the answer I was looking for online or in prior forum posts. I'm using Stata 18.
I want to generate a 2x2 table of the variable fin against arrest, but with the coding as it is, I will not have 1,1 in the top left cell as I would like.
Is there an easy, temporary way to switch the code for tabulate without having to generate different variables or change the coding of the current variables?
Thanks very much!
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte(week arrest fin age race wexp mar paro prio) 20 1 0 27 1 0 0 1 3 17 1 0 18 1 0 0 1 8 25 1 0 19 0 1 0 1 13 52 0 1 23 1 1 1 1 1 52 0 0 19 0 1 0 1 3 52 0 0 24 1 1 0 0 2 23 1 0 25 1 1 1 1 0 52 0 1 21 1 1 0 1 4 52 0 0 22 1 0 0 0 6 52 0 0 20 1 1 0 0 0 52 0 1 26 1 0 0 1 3 52 0 0 40 1 1 0 0 2 37 1 0 17 1 1 0 1 5 52 0 0 37 1 1 0 0 2 25 1 0 20 1 0 0 1 3 46 1 1 22 1 1 0 1 2 28 1 0 19 1 0 0 0 7 52 0 0 20 1 0 0 0 2 52 0 0 25 1 0 0 1 12 52 0 0 24 0 1 0 1 1 52 0 0 23 1 0 0 1 4 52 0 1 44 1 1 1 1 0 24 1 1 29 1 1 0 1 2 52 0 1 28 0 1 0 1 1 52 0 1 21 1 1 0 0 0 52 0 1 19 1 1 0 1 2 52 0 0 33 1 1 0 1 1 52 0 0 19 1 0 0 0 2 52 0 1 19 1 0 0 1 3 52 0 1 23 1 1 1 1 9 end label values arrest yes_no label values fin yes_no label values race yes_no label values wexp yes_no label values mar yes_no label values paro yes_no label def yes_no 0 "No", modify label def yes_no 1 "Yes", modify

Comment