Dear stata list,
I have a data set with three groups: other, indig and unknown.
I am trying to predict which proportion of an 'unknown' group is indig using CANDISC. After running Candisc with my grouping variable colour (1indig, 2 other, 3 unknown), I wish to obtain the probability of being 'indig' in the unknown group. 'Do I use estat classtable, prob'? and use the total average posterior probabilities score for 'uknown' as the estimated probability?
here is my syntax:
. candisc unidepY_N phys_number hangingYN demo1 psych2 le1 le6 le7 le5 le3 le4,
> group ( indig_other_unknown)
Thanks,
Allison
Canonical linear discriminant analysis
| | Like-
| Canon. Eigen- Variance | lihood
Fcn | Corr. value Prop. Cumul. | Ratio F df1 df2 Prob>F
----+---------------------------------+------------------------------------
1 | 0.2256 .05362 0.6331 0.6331 | 0.9205 35.756 22 1.9e+04 0.0000e
2 | 0.1736 .031076 0.3669 1.0000 | 0.9699 28.907 10 9302 0.0000 e
---------------------------------------------------------------------------
Ho: this and smaller canon. corr. are zero; e = exact F
Standardized canonical discriminant function coefficients
| function1 function2
-------------+----------------------
unidepY_N | -.221696 .0527025
phys_number | .097477 .3828076
hangingYN | -.3369913 -.2886416
demo1 | -.7805907 -.1454368
psych2 | -.0847857 .4737577
le1 | -.0384995 -.3522066
le6 | .1490068 -.3371339
le7 | .1222942 -.3227438
le5 | .1619976 -.1516034
le3 | -.1707017 -.088264
le4 | -.149231 -.2266881
Canonical structure
| function1 function2
-------------+----------------------
unidepY_N | -.3972627 .4109134
phys_number | -.262388 .2814486
hangingYN | -.4214928 -.2506518
demo1 | -.8159217 -.1121194
psych2 | -.2965078 .502158
le1 | -.1772761 -.4004889
le6 | .1362709 -.4429843
le7 | .1036188 -.3933882
le5 | .16394 -.285058
le3 | -.2253671 -.2147591
le4 | -.1916131 -.2845864
Group means on canonical variables
indig_other_ | function1 function2
-------------+----------------------
indig | .9850372 .0441643
other | -.0616017 .0928808
unknown | -.0277175 -.3451284
Resubstitution classification summary
+---------+
| Key |
|---------|
| Number |
| Percent |
+---------+
True | Classified
indig_other_ |
unknown | indig other unknown | Total
-------------+---------------------------+--------
indig | 368 49 69 | 486
| 75.72 10.08 14.20 | 100.00
| |
other | 2,069 2,527 2,311 | 6,907
| 29.96 36.59 33.46 | 100.00
| |
unknown | 595 418 908 | 1,921
| 30.97 21.76 47.27 | 100.00
-------------+---------------------------+--------
Total | 3,032 2,994 3,288 | 9,314
| 32.55 32.15 35.30 | 100.00
| |
Priors | 0.3333 0.3333 0.3333 |
. estat classtable if indig_other_unknown=3, prob
invalid syntax
r(198);
. estat classtable, prob
Average-posterior-probabilities classification table
+-------------------------------+
| Key |
|-------------------------------|
| Number |
| Average posterior probability |
+-------------------------------+
True | Classified
indig_other_ |
unknown | indig other unknown Unclassified
-------------+----------------------------------------
indig | 368 49 69 1
| 0.5373 0.4650 0.4185
|
other | 2,069 2,527 2,311 10
| 0.4923 0.4990 0.4734
|
unknown | 595 418 908 3
| 0.4797 0.4757 0.4835
-------------+----------------------------------------
Total | 3,032 2,994 3,288 14
| 0.4953 0.4952 0.4750
|
Priors | 0.3333 0.3333 0.3333
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/