Hi!
I am using -camat- to perform a correspondence analysis with four columns. But I can't wrap my head around how to add labels to the row and column markers in -cabiplot-. Ideally, I would like r1-r23 to have labels attached based on a string variable in the same dataset, "var_str" in example below. Also I would preferably like to be able to change the column marker labels to the variable labels. I am unsuccesful in using rowopts and colopts, hope you can guide me in the right direction by finishing up this code.
Grateful for any help!
Best,
Anton
I am using -camat- to perform a correspondence analysis with four columns. But I can't wrap my head around how to add labels to the row and column markers in -cabiplot-. Ideally, I would like r1-r23 to have labels attached based on a string variable in the same dataset, "var_str" in example below. Also I would preferably like to be able to change the column marker labels to the variable labels. I am unsuccesful in using rowopts and colopts, hope you can guide me in the right direction by finishing up this code.
Code:
clear input str6 var_str float(x1 x2 x3 x4) float(var) "Test1" 120 450 780 30 1 "Test2" 150 490 820 40 2 "Test3" 130 470 810 35 3 "Test4" 110 420 760 25 4 "Test5" 140 460 800 38 5 "Test6" 115 430 770 28 6 "Test7" 145 495 835 45 7 "Test8" 125 455 790 33 8 "Test9" 135 480 815 37 9 "Test10" 100 410 750 20 10 "Test11" 160 500 850 50 11 "Test12" 170 520 870 55 12 "Test13" 180 540 890 60 13 "Test14" 190 560 910 65 14 "Test15" 200 580 930 70 15 "Test16" 210 600 950 75 16 "Test17" 220 620 970 80 17 "Test18" 230 640 990 85 18 "Test19" 240 660 1010 90 19 "Test20" 250 680 1030 95 20 "Test21" 260 700 1050 100 21 "Test22" 270 720 1070 105 22 "Test23" 280 740 1090 110 23 end la var x1 "One" la var x2 "Tow" la var x3 "Three" la var x4 "Four" mkmat x1 x2 x3 x4, matrix(data_matrix) camat data_matrix, dimensions(2) normalize(sy) cabiplot, aspect(0.5)
Best,
Anton
Comment