Announcement

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

  • Correlate scales from different sources when data is in long format

    Hi

    My data is in long format and consists of six sub-scales (Scale1-Scale6) and three different respondents (parent, teacher, and child).
    My aim is to test the correlation between the child responses and the teacher / parent responses for each sub-scale (12 correlations in total). For example;
    1. Correlate parent and child responses for Scale 1
    2. Correlate teacher and child responses for Scale 1
    3. Correlate parent and child responses for Scale 2
    4. Correlate teacher and child responses for Scale 2
    5. Correlate parent and child responses for Scale 3
    6. Correlate teacher and child responses for Scale 3
    .
    .
    Etc.

    When using the by respondent prefix (by Respondent, sort: correlate Scale1-Scale6) the results show the correlation of Scale1-Scale6 by respondent. Alternatively, when I select only one Scale (by Respondent, sort: correlate Scale1) the results equal 1 for each respondent.

    I appreciate I can rename the variables to distinguish the respondent, convert the dataset to wide format then correlate but my preference is to keep the dataset long if possible.

    I am currently using Stata version 15.1.

    Thanks in advance for your time.
Working...
X