Announcement

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

  • Generating dependent variable based on ohter variables for panel data

    In my merged dataset, I want to generate my dependent variable for my regression analysis.

    I want to examine the following hypotheses:
    H1: Business-related terror attacks have a negative impact on M&A flows
    H2: Business-related terrorist attacks have a stronger impact on M&A flows than non-business related ones.


    My regression model is the following:

    Click image for larger version

Name:	Regressie model.PNG
Views:	3
Size:	10.9 KB
ID:	1442588


    The dependent variable is the M&A flow (MAijt), which is the deal flow in millions of dollars from an acquirer country (i) to a specific target country (j) in a specific time t (year) worldwide (from 1980 till 2016).

    I have the four important variables in my dataset:
    - acquiror country: acqnatcode
    - target country: tarnatcode
    - dealvalue in million: dealvalue
    - time: year

    Maybe I have to generate the sum of dealvalues per country and per year, but I am not sure if that is really what M&A flow is. A paper by Ouyang and Rajan (2017), Impact of Terrorism on Cross-Border Mergers and Acquisitions, also works with the M&A flow from one country to another country.

    I want to measure if the frequency of terorrism attacks in a country decreases the M&A flow in million dollars to that country.

    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float year double dealvalue long(acqnatcode tarnatcode busterr) double buscas long nonbusterr double(nonbuscas gdp gdpgrowth)
    1993 58.601 87 137 0 0 0 0 349037818106.3123 559692200293.9093
    1993 21.268 87 23 0 0 0 0 225924679920.70895 337882003882.90875
    1993 4.594 23 202 0 0 0 0 2068555542410.9783 2725474628466.498
    1993 .4 165 38 0 0 0 0 444731282436.76215 1179160981085.9236
    1993 .493 195 32 0 0 0 0 577170761956.4375 1027867181693.2921
    1993 13.9 108 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 23.258 38 78 0 0 0 0 120353947980.76427 124160191380.5378
    1993 21.149 63 34 0 0 0 0 40614350197.235275 127191921081.7745
    1993 14.5 192 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 26.425 137 63 0 0 0 0 1330094973361.1306 1945934472017.7415
    1993 50.001 170 137 0 0 0 0 349037818106.3123 559692200293.9093
    1993 5.217 202 146 0 0 0 0 96045645026.17801 224108561760.12195
    1993 7.403 18 192 0 0 0 0 1061388722255.549 1671944040741.0334
    1993 .299 177 135 0 0 0 0 120579072750.59557 280697969474.6999
    1993 12.7 192 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 2.5 202 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 6.419 32 63 0 0 0 0 1330094973361.1306 1945934472017.7415
    1993 69 18 135 0 0 0 0 120579072750.59557 280697969474.6999
    1993 8.689 192 63 0 0 0 0 1330094973361.1306 1945934472017.7415
    1993 11.704 195 192 0 0 0 0 1061388722255.549 1671944040741.0334
    1993 10.501 195 179 0 0 0 0 264353008121.27774 427416482616.202
    1993 21.069 202 176 0 0 0 0 16452201100.960413 41493319725.44835
    1993 121.288 63 171 0 0 0 0 523649481762.32184 894372683534.0675
    1993 33.993 195 192 0 0 0 0 1061388722255.549 1671944040741.0334
    1993 55.169 195 202 0 0 0 0 2068555542410.9783 2725474628466.498
    1993 11.19 128 137 0 0 0 0 349037818106.3123 559692200293.9093
    1993 42.056 195 192 0 0 0 0 1061388722255.549 1671944040741.0334
    1993 7.692 32 13 0 0 0 0 312372821810.0056 636606245168.6907
    1993 10 192 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 .88 32 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 4.376 162 15 0 0 0 0 5200265957.446809 11913533954.192118
    1993 69.785 137 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 149.031 177 61 0 0 0 0 89255751014.88498 150891678303.06055
    1993 9 195 196 0 0 0 0 13099013835.511147 17661951956.772503
    1993 6.518 32 169 0 0 0 0 10338679635.76159 24061733433.571102
    1993 681.525 32 192 0 0 0 0 1061388722255.549 1671944040741.0334
    1993 50.616 192 177 0 0 0 0 209950792712.69623 307231574781.4003
    1993 21.756 108 78 0 0 0 0 120353947980.76427 124160191380.5378
    1993 .115 195 94 0 0 0 0 4466565327401.262 4886459716967.016
    1993 23.416 170 202 0 0 0 0 2068555542410.9783 2725474628466.498
    1993 84.275 137 192 0 0 0 0 1061388722255.549 1671944040741.0334
    1993 1.7 42 11 0 0 0 0 236741715015.015 259675534967.54877
    1993 12.016 32 36 0 0 0 0 49297773130.118515 100608438212.43454
    1993 5.862 165 182 0 0 0 0 128889832382.81805 179866180005.36987
    1993 1000 202 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 15.822 202 146 0 0 0 0 96045645026.17801 224108561760.12195
    1993 15.744 89 171 0 0 0 0 523649481762.32184 894372683534.0675
    1993 15.895 202 49 0 0 0 0 143195607581.8566 236891577726.115
    1993 199.963 195 171 0 0 0 0 523649481762.32184 894372683534.0675
    1993 33.712 87 135 0 0 0 0 120579072750.59557 280697969474.6999
    1993 .3 179 202 0 0 0 0 2068555542410.9783 2725474628466.498
    1993 130.001 195 63 0 0 0 0 1330094973361.1306 1945934472017.7415
    1993 185.687 195 32 0 0 0 0 577170761956.4375 1027867181693.2921
    1993 3.643 135 192 0 0 0 0 1061388722255.549 1671944040741.0334
    1993 9.063 192 85 0 0 0 0 275570363432.31 520937305714.16925
    1993 53.246 202 176 0 0 0 0 16452201100.960413 41493319725.44835
    1993 .966 149 80 0 0 0 0 40119073326.35733 88499989686.17362
    1993 52.696 171 125 0 0 0 0 503962832199.2553 696284178075.8685
    1993 1.341 195 32 0 0 0 0 577170761956.4375 1027867181693.2921
    1993 4.488 78 140 0 0 0 0 46775067750.677505 89421826392.11357
    1993 199.728 137 177 0 0 0 0 209950792712.69623 307231574781.4003
    1993 15.001 159 78 0 0 0 0 120353947980.76427 124160191380.5378
    1993 3.432 170 13 0 0 0 0 312372821810.0056 636606245168.6907
    1993 22.139 89 12 0 0 0 0 190379720927.48135 276585576858.2261
    1993 10.24 63 192 0 0 0 0 1061388722255.549 1671944040741.0334
    1993 23.228 195 202 0 0 0 0 2068555542410.9783 2725474628466.498
    1993 5.343 195 192 0 0 0 0 1061388722255.549 1671944040741.0334
    1993 54.005 125 143 0 0 0 0 35158109999.49726 62587273352.523865
    1993 17.149 192 80 0 0 0 0 40119073326.35733 88499989686.17362
    1993 53.3 192 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 300 192 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 7.203 192 89 0 0 0 0 1061445225790.5747 1775635173596.9875
    1993 434 192 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 1.852 192 149 0 0 0 0 95019103603.042 172172638671.91602
    1993 5.486 13 87 0 0 0 0 52480251889.75462 90144469836.69962
    1993 3.75 192 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 1.018 192 87 0 0 0 0 52480251889.75462 90144469836.69962
    1993 75 32 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 35 94 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 98.9 195 98 0 0 0 0 23409027475.687862 73692978719.21864
    1993 27 192 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 1.795 192 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 17.5 192 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 3.171 135 49 0 0 0 0 143195607581.8566 236891577726.115
    1993 382 63 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 70 88 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 3.2 32 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 43 89 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 25.575 78 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 2.2 135 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 3.005 192 89 0 0 0 0 1061445225790.5747 1775635173596.9875
    1993 4.1 192 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 75 192 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 65 32 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 20.576 202 78 0 0 0 0 120353947980.76427 124160191380.5378
    1993 5.5 87 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 64 78 195 0 0 0 0 6.878718e+12 9637289595800.002
    1993 31.997 87 192 0 0 0 0 1061388722255.549 1671944040741.0334
    1993 3.836 32 192 0 0 0 0 1061388722255.549 1671944040741.0334
    1993 16.1 135 195 0 0 0 0 6.878718e+12 9637289595800.002
    end
    label values acqnatcode countrycodes
    label values tarnatcode countrycodes
    label def countrycodes 13 "AU", modify
    label def countrycodes 18 "BE", modify
    label def countrycodes 23 "BL", modify
    label def countrycodes 32 "CA", modify
    label def countrycodes 38 "CH", modify
    label def countrycodes 42 "CO", modify
    label def countrycodes 63 "FR", modify
    label def countrycodes 78 "HK", modify
    label def countrycodes 87 "IR", modify
    label def countrycodes 88 "IS", modify
    label def countrycodes 89 "IT", modify
    label def countrycodes 94 "JP", modify
    label def countrycodes 108 "MA", modify
    label def countrycodes 125 "MX", modify
    label def countrycodes 128 "NA", modify
    label def countrycodes 135 "NO", modify
    label def countrycodes 137 "NT", modify
    label def countrycodes 149 "PO", modify
    label def countrycodes 159 "SA", modify
    label def countrycodes 162 "SD", modify
    label def countrycodes 165 "SG", modify
    label def countrycodes 170 "SN", modify
    label def countrycodes 171 "SP", modify
    label def countrycodes 177 "SW", modify
    label def countrycodes 179 "SZ", modify
    label def countrycodes 192 "UK", modify
    label def countrycodes 195 "US", modify
    label def countrycodes 202 "WG", modify
    label def countrycodes 11 "AR", modify
    label def countrycodes 12 "AS", modify
    label def countrycodes 15 "BA", modify
    label def countrycodes 34 "CC", modify
    label def countrycodes 36 "CE", modify
    label def countrycodes 49 "DN", modify
    label def countrycodes 61 "FN", modify
    label def countrycodes 80 "HU", modify
    label def countrycodes 85 "IN", modify
    label def countrycodes 98 "KZ", modify
    label def countrycodes 140 "NZ", modify
    label def countrycodes 143 "PE", modify
    label def countrycodes 146 "PL", modify
    label def countrycodes 169 "SL", modify
    label def countrycodes 176 "SV", modify
    label def countrycodes 182 "TH", modify
    label def countrycodes 196 "UZ", modify

  • #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 (fixed spacing fonts help), and sample data using dataex. Also, try to cut your posting down to what is necessary for us to understand or replicate the issue - no need for piles of labels etc. And, avoid pictures and attached files -we can't do much with them.

    We are not substantive experts in your area. "Maybe I have to generate the sum of dealvalues per country and per year, but I am not sure if that is really what M&A flow is." Knowing what you want to measure as your dv is your problem (and that of your adviser if any) since it depends on specific knowledge of your substantive area, your theory, and your data. I'm not even sure what you want to use as your unit of observation - the deal or the country-year?

    If it is country-year, you'll probably want to collapse the data by country-year.


    Comment

    Working...
    X