Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte nbcas float(nbcas_cat nbcas_b nbcas2p) double(P19_POP1564 P19_H1564 P19_CHOM1564) float(P19_TCHOM1564 chom) 0 0 0 0 1584 752 108 7 0 1 1 1 0 1207 604 65 5 0 2 2 1 1 1848 899 99 5 0 0 0 0 0 1906 888 143 8 0 0 0 0 0 1276 632 110 . 0 0 0 0 0 14 8 0 0 . 0 0 0 0 70 70 0 0 . 1 1 1 0 1068 482 59 6 0 0 0 0 0 1672 776 120 7 0 0 0 0 0 1578 745 86 5 0 0 0 0 0 1426 630 104 7 0 1 1 1 0 2047 963 140 7 0 0 0 0 0 1441 683 128 . 0 0 0 0 0 1540 748 103 7 0 1 1 1 0 1123 504 63 6 0 0 0 0 0 0 0 0 . . 0 0 0 0 0 0 0 . . 0 0 0 0 1863 872 102 5 0 end
I'm using Stata/SE 17.0 for Mac, here's a sample of my data.
thanks for kind help, i'm failing to solve my problem
I'm trying to make a nested loop
I want to make a chi square with all combinations
Code:
tab X Y, row chi2
Y : chom nodip surocc men2 logvac pacti loc hlm fmonop pseule imm deci cath prop etr hmen pauv rev psoc
I managed to make the code work with only one loop :
Code:
ds chom nodip surocc men2 logvac pacti loc hlm fmonop pseule imm deci cath prop etr hmen pauv rev psoc
foreach v of varlist `r(varlist)' {
tab nbcas `v', row chi2
}
ideally i would also like all the p-values to be displayed so that i can copy and paste them in my results at once.
Thank you so much !!
Sybille
Comment