Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Forming an index weighted by the corvariance matrics of variables.


    Dear all,

    May I ask your favor for showing how can I derive what I want:

    As the table shows, for each subject, I have collected 5 variables (Q1-Q5) measuring their mental health condition in different aspects. Right now, I want to form an index to represent subjects' mental health levels for further analysis. Among the literature, I have found a method to achieve this. However, since I have no experience with matrix operation at all, I lost myself for the next step.
    [ATTACH=CONFIG]n1603058[/ATTACH]

    It will be appreciated if anyone can tell me how to generate this index variable in Stata. Thank you for your help in advance. (You can use the example table for demonstration)
    subject Q1 Q2 Q3 Q4 Q5
    1 3 3 1 2 4
    2 3 2 2 5 5
    3 4 4 2 4 6
    4 7 6 6 7 8
    5 8 7 3 7 4
    6 4 8 6 5 6
    7 1 2 3 2 1
    8 3 3 2 2 3
    9 5 4 1 7 6
    10 5 6 7 8 7
    Best regards,
    Wu

  • #2
    The image in post #1 does not seem to have been created correctly. Below I have copied the image from an earlier post of this question in the Mata forum.

    Click image for larger version

Name:	image.png
Views:	1
Size:	35.4 KB
ID:	1603088

    Comment


    • #3
      Thank you, William.

      Comment

      Working...
      X