Announcement

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

  • Robustness Tests

    Hi, am using panel data for a set of 84 firms, from 7 industries, with the dependent variable leverage, and independent variables profit, size, growth, risk, and tax shield.

    I am trying to perform robustness tests on my results to see whether they are correctly specified.

    I want to split my data up by firm size, growth, industry and sample period (my data is from 2005-2017)

    For size, I want to split my data up into three main segments with equal number of firms and then run my regressions again
    For growth I want to split them up into three equally weighted segments based upon their growth values
    I want the 7 industries to be regressed individually
    And finally i want to be able to split my sample period into two segments and run those regressions individually.

    Can anybody help me with my problem? It would be massively appreciated. Many thanks, Patrick

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

    If you want to split the sample, then you generate variables on which you want the split. So, if you want firms by size, do su size,d and use the values given to generate a sizeclass variable. Similarly for growth rates. While there are more efficient ways to generate the sizeclass or growthclass variables, you can do it with generate and replace statements.
    Then, you do bysort sizeclass: regress y x
    and bysort grwowthclass: regress y x
    and bysort industry : regress y x.

    Alternatively, you can do this manually:
    regress y x if size>500 & size<.
    regress y x if size>100 & size<500
    regress y x if size<100


    A random division can be created by generating a uniform variable and then cutting on values of that variable.
    g z=runiform()
    g thirds=3 if x>.666 & x<.
    replace thirds=2 if x<.666 & x>.333
    replace thirds=1 if x<.333

    then
    bysort thirds: regress y x.

    Comment

    Working...
    X