set more off use "C:\Users\7150\Downloads\EVS1999cz.dta", clear mean age sum age recode age (18/29=1) (30/39=2) (40/49=3) (50/max=4) (else=.), gen(age_cat) tab age_cat, miss label define age_cat 1 "18-29" 2 "30-39" 3 "40-49" 4 "50+" label values age_cat age_cat tab age_cat, miss *dvojrozmerne tabulky gen sex = v291 label values sex V291 /* prirazuji label */ tabulate age_cat sex, row col cell expect all tabulate age_cat sex, row nofreq tabulate age_cat sex [aweight=weight], col freq tabulate age_cat sex [aweight=weight], col freq tabulate age_cat sex , col freq all tabulate age_cat v6, row all spearman age_cat v6 bysort sex: tabulate age_cat v6, col freq all bysort sex: spearman age_cat v6 *vicerozmerne tabulky tab2 age_cat v6 sex table age_cat sex v6, nomiss *kombinace kategorizovanych a spojitych promennych tab sex, sum(age) bysort sex: sum age tabstat age, by(sex) stat(mean median N) tab sex c4, sum(age) nofreq nost *korelace spojite znaky corr age v6 corr age v6 , means corr age v6 c4 pwcorr age v6 c4, obs pcorr age v6 c4 /* parcialni korelace */ *korelace pro kategorizovane znaky spearman v6 c4 tab v6 c4, col all