Announcement

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

  • Control variables for intraday data.

    Hi everyone,
    I would like to add control variables (BookToMarket, Size...) to my data to regress Abnormal return on text sentiment. For each firm and specific date, I have several thousands of row of data.
    Each row is a unique sentence and variables associated with it.
    I have included a sample of my data.
    If I add the size(log of market cap), BooktoMarket ...., then I would be adding the same values for thousands of rows which raises some question marks on my mind. If my data was based on days rather than intraday data, I would have included the values for those variables.
    I can also tag each of those values according to quintiles (1...5) and then use it in my regression as categorical variable.
    In the sample data, I categorized variables (ln_mktcap bm roa) according to quintiles.

    Should I just use the raw data rather than quintiles in my regression? What would be the best way to add those variables to my regression?

    reghdfe AbnRet i.Sentiment i.ln_mktcap i.bm i.roa, absorb(year SIC) cluster(month_year)

    Thank you.





    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input byte Sentiment double AbnRet float(year month_year) byte(SIC ln_mktcap bm roa)
    0  .000042760626015603265 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0  -.00008552490912983046 2017 685 38 5 3 5
    0    .0000427551413056948 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0   -.0010592237732415244 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    1  -.00004275514130580582 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1  -.00004275331338177146 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1 -.000042751485614056506 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    0   .00004274965800266095 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    2                       0 2017 685 38 5 3 5
    1  .000042751485614056506 2017 685 38 5 3 5
    1  .000042753313381882485 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    2                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    2                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    2                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1    .0000427551413056948 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0  -.00012828187804658775 2017 685 38 5 3 5
    0    .0001282654239170844 2017 685 38 5 3 5
    0    .0021446675765255385 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0  .000042760626015603265 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    1   -.0001282873636947457 2017 685 38 5 3 5
    0    .0000855139387719861 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    2                       0 2017 685 38 5 3 5
    2                       0 2017 685 38 5 3 5
    1  -.00008552125203098448 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    1    .0000855139387719861 2017 685 38 5 3 5
    1  1.1102230246251565e-16 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    0   .00008552125203120653 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    0                       0 2017 685 38 5 3 5
    2                       0 2017 685 38 5 3 5
    1   -.0000427642832705466 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    1                       0 2017 685 38 5 3 5
    0   .00004276245456480421 2017 685 38 5 3 5
    end
    format %tm month_year
    label values Sentiment sentimentlabel
    label def sentimentlabel 0 "Neu", modify
    label def sentimentlabel 1 "Pos", modify
    label def sentimentlabel 2 "Neg", modify
Working...
X