Jorge Manuel de Almeida Magalhães
2007-Oct-05 20:33 UTC
[R] Variable characterization by the modalities of other variables
Dear Sirs, Is there a way to make in R a variable modalities characterisation by the modalities of other categorical variables? Usually I do this task in SPAD. The output are: column 3 -- modality % in the class column 4 -- modality % in the population column 5 -- class % in the modality suppose: Variable A (two modalities: A1 and A2) dependent variable Variable B (two modalities: B1 and B2) independent variable variable A - modality A1 Variable---------Modality-------- column 3-------- column 4 ---- column 5 ---- chi-squared ---- p-value A A1 100 67.45 40.87 2 0,00 B B2 56 23 45 1.8 0,00 variable A -- modality A2 Variable---------Modality-------- column 3-------- column 4 ---- column 5 ---- chi-squared ---- p-value A A2 100 57.45 30.28 3 0,00 B B1 38 32 25 2.3 0,00 Have a nice night Thanks a lot Jorge