Oct-14-2019, 11:42 PM
Hi: The best way I know to ask this is to ask if Python has a similar way of entering crosstab data directly using a count variable and use it in a crosstab analysis. Similar to the SAS "PROC FREQ" and "WEIGHT" statement. I find this useful when I only have the crosstab frequency data like from a textbook or study. Similar to below from SAS. Thanks.
data a;
input sick $ ate $ count;
cards;
yes yes 35
yes no 25
no yes 47
no no 61
;
proc freq data = a;
tables sick*ate/chisq agree;
weight count;
run;
data a;
input sick $ ate $ count;
cards;
yes yes 35
yes no 25
no yes 47
no no 61
;
proc freq data = a;
tables sick*ate/chisq agree;
weight count;
run;