I am trying to create cluster by using command --cluster wardslinkage activity_1 activity_2 activity_3 activity_4, gen(act)-
Where activity is a categorical variable, so the individuals response the type of activity done in a particular time duration. However, one can skip to reply if no activity has been done, that gives a missing value.
While running the command, if the individuals have not done any activity shows a missing value. I want to put all of them together to get the final cluster with Wards method (hierarchial clustering method).
Here I am showing the values generated after I run the command:
ID | activity_1 | activity_2 | activity_3 | activity_4 | act_id | act_ord | act_hgt |
4038 | Resting | Leisure | Work | Leisure | 4 | 118 | 5.8333333 |
3242 | HHact | Work | Work | HHact | 5 | 10 | 0 |
5980 | Work | Resting | Work | Out/travel | 6 | 65 | 0 |
4454 | Work | Resting | Work | . | . | . | . |
1545 | Resting | Selfcare | Work | Leisure | 7 | 161 | 0 |
4322 | Work | Leisure | Work | Leisure | 8 | 168 | 0 |
5186 | HHact | HHact | Work | Resting | 9 | 223 | 16.12381 |
Thanks
Srei Chanda
0 Response to Hierarchial cluster analysis
Post a Comment