Hello,
I have a longitudinal dataset (5 waves) and I´m using the command by sex wave, sort: xttab unsafe_dv to look for the number of individuals by sex that answer "yes" and n"o" to unsafe_dv. The result is a sequence of tables with the required information. Is it possible to have a single table with all the information?
Thank y ou very much in advance.
I have a longitudinal dataset (5 waves) and I´m using the command by sex wave, sort: xttab unsafe_dv to look for the number of individuals by sex that answer "yes" and n"o" to unsafe_dv. The result is a sequence of tables with the required information. Is it possible to have a single table with all the information?
Thank y ou very much in advance.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long(pidp pid) byte sex float wave byte unsafe_dv 633352005 97406155 2 1 . 683918177 31845606 2 1 . 1157098895 . 1 1 . 613171645 11302127 1 1 . 1564745971 . 2 1 . 408423647 . 2 1 . 217620484 . 1 1 . 749100247 . 1 1 . 816146215 . 1 1 . 69869329 16778111 1 1 . 1156027211 . 1 1 . 1293664651 . 1 1 0 816133967 . 2 1 . 1224690207 . 1 1 . 435924205 118739549 1 1 . 1293398767 . 1 1 0 70127049 18346677 2 1 . 422150129 94933499 2 1 . 172978482 . 2 1 . 748584884 . 2 1 . 1360410051 . 2 1 . 884158455 . 1 1 . 544811247 . 2 1 . 205445715 . 1 1 0 136540609 14402327 2 1 . 68740595 . 2 1 . 204408011 . 2 1 . 1292913939 . 1 1 . 1225353282 . 2 1 . 819397965 11892153 2 1 . 1292189059 . 1 1 . 1634644527 . 1 1 0 1428384887 . 2 1 . 410598287 . 2 1 . 273079167 . 2 1 . 683372129 33188769 1 1 . 891554882 . 2 1 0 749161451 . 2 1 . 205319209 10468056 2 1 . 292674725 96945303 2 1 . 632578165 97933848 2 1 . 205916249 123559545 1 1 . 748897724 . 1 1 . 274509211 . 2 1 . 340758211 . 1 1 . 1088426371 . 1 1 . 1497121327 . 1 1 . 544184975 . 1 1 . 274468411 . 2 1 . 1157062167 . 2 1 . 1088819427 . 1 1 . 1428334567 . 1 1 . 1496956767 . 2 1 . 544240047 . 1 1 . 1428425011 . 1 1 . 1496985327 . 1 1 . 1020802411 . 1 1 . 91810885 119261278 1 1 . 680922091 . 1 1 . 1566525543 . 2 1 0 614299089 76816591 2 1 . 478639091 . 2 1 . 546802967 . 1 1 . 1299195164 . 2 1 0 416636284 . 2 1 . 1566423527 . 2 1 0 68843887 . 1 1 . 342501727 . 2 1 . 1428469887 . 1 1 0 206572447 . 2 1 . 1088120367 . 1 1 . 136066649 10669582 2 1 . 476701771 . 2 1 . 639238089 118758578 2 1 . 1224235295 . 2 1 . 1497122007 . 2 1 . 476030609 10340416 2 1 . 409332811 . 1 1 . 884806491 . 2 1 . 1020639207 . 2 1 . 70080125 16247396 2 1 . 1564837771 . 2 1 . 476413451 . 2 1 0 1226738371 . 1 1 1 884711295 . 2 1 . 1088091127 . 2 1 . 292852885 96931248 2 1 . 410527567 . 1 1 . 272930257 17421942 2 1 . 354131765 96051728 2 1 . 410569047 . 2 1 . 170326562 . 1 1 . 612083647 . 2 1 . 572229593 119318571 2 1 . 1157811527 . 2 1 0 680359731 . 2 1 . 340851369 16829611 2 1 . 69177095 . 2 1 . 204979207 . 1 1 . 639380205 118898116 1 1 . end label values pid pid label values sex c_sex label def c_sex 1 "male", modify label def c_sex 2 "female", modify label values unsafe_dv c_unsafe_dv label def c_unsafe_dv 0 "no", modify label def c_unsafe_dv 1 "yes", modify

Comment