Announcement

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

  • Calculating correlation between multiple observations

    Hello,

    I would like to calculate correlation of performance for members within a task project.
    High correlations would imply that their performance move in the same direction - performing well together at a given period, and bad together at another period.
    Low correlations would mean that their performance move in all different direction - some performing well, while others perform bad at a given period.
    I think it can be interpreted as measuring cronbach's alpha over time - how individuals' performance are related as a group in different time periods.

    I have an identifier for each team (2-digit code), and performance for each team member at each year.
    Would it be possible to derive year-to-year correlation of within-team members' performance for each team? Thank you!

    There is one additional concern I have in devising codes for such calculation.
    : Members engaged in a task project change, although very rarely. For example, at period t there are may be 5 people (A1, A2, A3, A4, A5) in the task project #1, while at period t+1 there may be 6 people in the same project, with two people newly added to the team (B1, B2), and one person dropped out of the team (A4). One way to solve this issue is to only compute performance correlation for members that exist on both periods. How can I code such condition into each team?

  • #2
    So, if you arrange your data such that you have four variables: team_id, person_id year and performance_measure with the data in long layout (for all I know that's how it is currently arranged--you don't show it), then you can run:

    Code:
    mixed performance_measure || team_id: || person_id:
    estat icc
    The intra-class correlation at the team_id level will be a measure of how the team's members behaviors move in together (or not). If you have reason to believe there are time effects in play, you could also include some time-related variable(s) into the -mixed- command.

    Comment


    • #3
      Thank you so much for your help!

      One lingering question is that if I execute the code, it gives an overall intraclass coefficient for how members move in together.

      However, I would like to compute year-to-year correlation for each team, and for each financial year.

      Plus, I would like to store the result as a variable, as I would like to investigate the relationship between

      'within-group correlation at t' and 'performance at t+1'

      I am not sure whether my question is conveyed clearly. Still, I would appreciate it if you can give me some advice.

      Thank you again!

      Comment


      • #4
        So you can loop over the years and run the same code with -if year == current_value_of_year_in_loop-. -estat icc- leaves behind its result in r(), so if you do it once and run -return list-, you can see what it's called and then in your loop you can store that result in a variable.

        Comment

        Working...
        X