Announcement

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

  • Panel data: Time series averages of daily cross sectional correlation

    Hi all,

    I have the following problem and would like to ask for your help:
    • I have panel data sorted by company and date (Integer, Format: %tdnn/dd/CCYY e.g. 2/10/2018)
    • I want to generate a time series of daily cross-sectional correlations between certain variables (Volume, Views, Market Cap)
    I need to generate a correlation matrix, which averages each days correlation coefficient over the time series.

    I found below link but couldn't adjust it to my daily pattern. Any help is appreciated.


    https://www.statalist.org/forums/for...elation-matrix

    Thanks,
    Jan

  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

    Egen (you may need to install egenmore) will do correlations for a variety of things and allows by variables so you could use this to calculate the daily correlations. Then you can use either collapse or egen with means to do your averages.

    Comment

    Working...
    X