[R] Variable characterization by the modalities of other variables
Jorge Manuel de Almeida Magalhães
jmagalhaes at oninetspeed.pt
Fri Oct 5 22:33:02 CEST 2007
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
More information about the R-help
mailing list