Announcement

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

  • create a table with two "variable-groups" as x- and y-axis and the corresponding returns for each combination

    Hello

    I am trying to recreate table1, panel A from Fama & French (2015), which looks as follows: 5 size-groups as rows and 5 BM-groups as columns?
    1 2 3 4 5
    1 0.26 0.81 0.85 1.01 1.15
    2 .... .... .... ..... .....
    3 .... ..... .... ... ....
    4 ... ... ... ... ...
    5 ... .... .... .... ....
    My dataset looks as follows:
    size-group bm-group excess return
    1 1 0.26
    1 2 0.81
    1 3 0.85
    1 4 1.01
    1 5 1.15
    2 1 0.48
    2 2 ....
    ... .... ....
    I hope somebody can help me.

    Pascal

  • #2
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input byte(size bm) float return
    1 1  .26
    1 2  .81
    1 3  .85
    1 4 1.01
    1 5 1.15
    2 1  .48
    end
    
    table size bm, contents(mean return)
    
    
    ----------------------------------------
              |              bm             
         size |    1     2     3     4     5
    ----------+-----------------------------
            1 |  .26   .81   .85  1.01  1.15
            2 |  .48                        
    ----------------------------------------

    Comment


    • #3
      Thank you very much!

      Comment

      Working...
      X