Size: 502
Comment:
|
← Revision 12 as of 2013-03-08 10:17:39 ⇥
Size: 1949
Comment: converted to 1.6 markup
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
== How do I do a multiple line plot of cluster profiles? == | |
Line 2: | Line 3: |
Suppose we five columns of factor scores, f1av to f5av, which we wish plot for each of five clusters, cluster membership forming a sixth column. | Suppose we gave four columns of factor scores, f1av to f4av, which we wish plot for each of two clusters, cluster membership forming a sixth column, as in the table below. [[attachment:lines.doc|A bit of editing in the chart editor yields this.]] ||||||||||||<20% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center">'''F1av''' ||'''F2av''' || '''F3av''' ||'''F4av''' || '''clus''' || ||||||||||||<20% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 1 || 2 || 2 || 2 || 1 || ||||||||||||<20% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 2 || 5 || 1 || 4 || 1 || ||||||||||||<20% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 3 || 4 || 3 || 5 || 2 || ||||||||||||<20% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 2 || 3 || 4 || 6 || 2 || |
Line 6: | Line 14: |
VARSTOCASES /MAKE score FROM f1av TO f5av. | VARSTOCASES /MAKE score FROM f1av TO f4av. |
Line 10: | Line 19: |
compute facno=mod(facno,5). if(facno eq 0) facno=5. |
compute facno=mod(facno,4). if(facno eq 0) facno=4. |
Line 16: | Line 25: |
/LINE(MULTIPLE)MEAN(score) BY facno BY clu5_2 | /title = 'cluster profiles of four factors' /LINE(MULTIPLE)MEAN(score) BY facno BY clus |
Line 19: | Line 29: |
Incidentally, Morey et al (1983) suggest the use of Ward's hierarchical clustering method due to its relatively superior power compared to other methods. __References__ Haldar P, Pavord ID, Shaw DE, Berry MA, Thomas M, Brightling CE, Wardlaw AJ, and Green RH (2008) Cluster analysis and clinical asthma phenotypes. American Journal of Respiratory and ''Critical Care Medicine'' '''178, (3)''' 218-224. Performs a two-stage cluster analysis using hierarchical clustering to provide cluster centres for a k-means clustering analysis. Morey LC, Blashfield RK and Skinner HA (1983) A comparison of cluster analysis techniques within a sequential validation framework. ''Multivariate Behavioral Research'' '''18''' 309-329. |
How do I do a multiple line plot of cluster profiles?
Suppose we gave four columns of factor scores, f1av to f4av, which we wish plot for each of two clusters, cluster membership forming a sixth column, as in the table below. A bit of editing in the chart editor yields this.
F1av |
F2av |
F3av |
F4av |
clus |
|||||
1 |
2 |
2 |
2 |
1 |
|||||
2 |
5 |
1 |
4 |
1 |
|||||
3 |
4 |
3 |
5 |
2 |
|||||
2 |
3 |
4 |
6 |
2 |
A multiple line plot can be drawn using the syntax below.
VARSTOCASES /MAKE score FROM f1av TO f4av. LIST. compute facno=$casenum. compute facno=mod(facno,4). if(facno eq 0) facno=4. exe. GRAPH /title = 'cluster profiles of four factors' /LINE(MULTIPLE)MEAN(score) BY facno BY clus /MISSING=REPORT.
Incidentally, Morey et al (1983) suggest the use of Ward's hierarchical clustering method due to its relatively superior power compared to other methods.
References
Haldar P, Pavord ID, Shaw DE, Berry MA, Thomas M, Brightling CE, Wardlaw AJ, and Green RH (2008) Cluster analysis and clinical asthma phenotypes. American Journal of Respiratory and Critical Care Medicine 178, (3) 218-224. Performs a two-stage cluster analysis using hierarchical clustering to provide cluster centres for a k-means clustering analysis.
Morey LC, Blashfield RK and Skinner HA (1983) A comparison of cluster analysis techniques within a sequential validation framework. Multivariate Behavioral Research 18 309-329.