Announcement

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

  • Regression possible or not? If yes, how?? Trying to check if economic preferences of country has an impact on ipo or not?

    Hi, I have dataset of around 7000 ipos from 34 countries and I am willing to check if the factors studied in "Global Evidence on Economic Preferences" like trust, patience has an impact on this returns or not? Being unbalance panel dataset, i was thinking a random effect regression but I am not sure? Also, how shall I segregate my data as I have ipo data from 2013-2018 and it includes various ipos returns information in each countries, while under independent variable I have single value for each given by the author of "Global Evidence on Economic Preferences"

    For instance,
    Attachement 01 for patience value
    Attachement 02 for ipo returns value

    is regression possible in this situation? Please guide if you can!!

    If anyone has any questions related to my questions please free to ask I would happy to explain more about problem.

    Thank you for your time!!

    Best Regards,
    Tapan
    Attached Files

  • #2
    Tapan:
    some comments about your query.
    1) you should start from -xtreg,fe-, provided that time-invariant variables will be wiped out. You should -xtset- your dataset with -panelid- of Stata complains about repeated time values;
    2) please share data excerpt/example via CODE delimiters (see the FAQ);
    3) it's up to you to provide enough data to help interested listers helping out yourself, not the other way round (see the FAQ again).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you! I will keep it in mind. I tried running fixed effect regression using country and transaction id as panel identifiers but when I run xtreg command post xtset, I get an error of no observation!!

      Comment


      • #4
        There are two common causes of getting a no observation error.
        1. One of the variables used in the regression command is actually a string variable, even if it looks like it is numeric in listings or in the browser. The way to check it is to run -describe- and find your variable in the output you get. Look under the storage type column. If it starts with str, you have a string variable. If that variable looks like it is actually numbers when you view the data in the browser or -list- it, then the proper way to convert it to numeric will be with the -destring- command. Read -help destring- carefully if you are not already familiar with it.
        2. Any observation containing a missing value on any variable mentioned in the regression command is excluded from the calculations. If it turns out that every observation has at least one regression command variable with a missing value (or perhaps there is even a single variable that is always missing), then you will have no observations left for the regression.
        Beyond that, nothing can be said without seeing workable example data from your data set. So if further assistance is needed, when posting back, be sure to post example data that illustrates your difficulties, and be sure to use the -dataex- command to do that so that it will truly be workable for those who want to help you. If you are running version 18, 17, 16 or a fully updated version 15.1 or 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

        Comment


        • #5
          Code:
          * Example generated by -dataex-. For more info, type help dataex
          clear
          input double(OfferTo1stClose pc1 pc2) long Country float year_only double(OfferSizeM G2013)
           1.2499985         .        . 1 2008 111.021   .
           6.2652154         .        . 1 2010 69.3451   .
          -2.345e-06         .        . 1 2010  25.243   .
              26.875         .        . 1 2011 6.40692   .
            9.090909         .        . 1 2011 361.424   .
                -1.3         .        . 1 2011      40   .
           4.7619047         .        . 1 2012 9.03852   .
           17.611944         .        . 1 2013 16.1896   .
           4.5454545         .        . 1 2016 301.611   .
           3.5403688         .        . 1 2016  20.964   .
           1.8918918         .        . 1 2016 34.0356   .
                   0         .        . 1 2017 30.0883   .
            22.23077         .        . 1 2017 381.823   .
           12.899371         .        . 1 2017   953.8   .
          -3.5294118         .        . 1 2017 485.714   .
           12.368421         .        . 1 2017 1017.07   .
                  .1         .        . 1 2018     115   .
           7.2727275         .        . 1 2018 299.491   .
                 -48         .        . 2 2007  7.2576   .
                  10         .        . 2 2007  4.3705   .
           4.9999986         .        . 2 2007  3.4344   .
                  -2         .        . 2 2007 15.4263   .
                   5         .        . 2 2007  2.6445   .
                 -22         .        . 2 2007  2.1895   .
               -32.5         .        . 2 2007  6.4722   .
          -17.500002         .        . 2 2007  18.144   .
                  20         .        . 2 2007 4.41588   .
                  96 -.3175539 .0452844 2 2007  1.8514 5.6
                 -30         .        . 2 2007   4.325   .
           -16.66667         .        . 2 2007 2.34677   .
          -15.000001         .        . 2 2007  5.3298   .
                   4         .        . 2 2007   8.854   .
                   5         .        . 2 2007 107.723   .
           27.499998         .        . 2 2007 1.95558   .
           4.9999986         .        . 2 2007  2.6208   .
                   0         .        . 2 2007 11.2392   .
                 -40         .        . 2 2007 9.92713   .
          -22.500002         .        . 2 2007  3.6804   .
          -25.000002         .        . 2 2007  7.4096   .
          -36.666668         .        . 2 2007  2.6502   .
                  -2         .        . 2 2007  4.4005   .
                 -28         .        . 2 2007  4.0805   .
          -25.000002         .        . 2 2007  3.5032   .
                 -32         .        . 2 2007   8.834   .
           29.999998         .        . 2 2007   45.69   .
          -25.000002         .        . 2 2007 2.00376   .
          -20.000004         .        . 2 2007   9.228   .
                  -6         .        . 2 2007 14.1185   .
           9.9999981         .        . 2 2007    6.92   .
                 -50         .        . 2 2007 4.35008   .
           4.9999986         .        . 2 2007  2.7036   .
          -1.490e-06         .        . 2 2008  5.7246   .
           19.999998         .        . 2 2008  .56088   .
          -86.333336         .        . 2 2008 1126.26   .
           49.999996         .        . 2 2008   4.646   .
           49.999996         .        . 2 2008  1.9082   .
                   0         .        . 2 2008 23.2325   .
                  -8         .        . 2 2008   .9624   .
           8.7499981         .        . 2 2008   4.657   .
                  -2         .        . 2 2008   23.99   .
                 195         .        . 2 2008   9.596   .
          -7.5000014         .        . 2 2008  3.8412   .
          -64.400002         .        . 2 2008  3.0555   .
                  75         .        . 2 2008 3.35825   .
           49.999996         .        . 2 2008  2.6061   .
           34.999996         .        . 2 2008  2.7807   .
           19.999998         .        . 2 2008 1.01985   .
                  -4         .        . 2 2008  5.6172   .
           49.999996         .        . 2 2008 2.31725   .
          -1.490e-06         .        . 2 2008 2.38575   .
                   2         .        . 2 2008 8.48875   .
           12.499998         .        . 2 2008  3.7084   .
                  18         .        . 2 2008 47.4909   .
          -1.490e-06         .        . 2 2008   2.307   .
           14.999998         .        . 2 2008  4.6465   .
                 -10         .        . 2 2008  4.6025   .
          -1.490e-06         .        . 2 2008  10.864   .
          -1.490e-06         .        . 2 2008   4.812   .
                   0         .        . 2 2008   8.569   .
           9.9999981         .        . 2 2008 2.29344   .
          -5.0000014         .        . 2 2008  3.7312   .
          -2.5000014         .        . 2 2008  6.6927   .
                 -20         .        . 2 2008  9.1755   .
          -5.0000014         .        . 2 2008   7.197   .
          -1.490e-06         .        . 2 2008    3.79   .
               -21.5         .        . 2 2008 120.425   .
           14.999998         .        . 2 2008  5.6736   .
           34.999996         .        . 2 2008  7.6928   .
           42.499996         .        . 2 2008  4.6465   .
           14.999998         .        . 2 2008  3.4976   .
               -62.5         .        . 2 2008 13.4801   .
                 -60         .        . 2 2008  2.6412   .
                  20         .        . 2 2008  3.7264   .
                 100         .        . 2 2009   5.394   .
           3.3333292         .        . 2 2009 43.3797   .
           14.999998         .        . 2 2009  1.2878   .
                 -26         .        . 2 2009 7.55496   .
           51.428574         .        . 2 2009 11.1402   .
           49.999996         .        . 2 2009   5.565   .
           24.999998         .        . 2 2009 10.0296   .
          end
          label values Country Country
          label def Country 1 "ARGENTINA", modify
          label def Country 2 "AUSTRALIA", modify
          The above is my data and PC1 and PC2 are behavioural values given to each country so my problem is I have huge list of IPO from each country but for each country I have only 1 behavioural value. However, that's the purpose too as I am checking if holds value in ipo performance. Also, I am getting repeated time value in panel because of it while defining xtset.

          Also, Thank you for your response and answer. It surely helped me. I look forward to hearing from you again.

          Best Regards,
          Tapan

          Comment


          • #6
            Tapan:
            your dataset cannot be analyzed until you decide how deal with the massive amount of missing values.
            Last edited by Carlo Lazzaro; 23 Aug 2024, 08:45.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Thank you so much Carlo, I have solved that problem but still when I try to run random effect or fixed effect I am getting "repeated time value" error i.e., xtset Country year_only (Similar to mentioned in paper I am replicating the methodology)

              Paper Name: Influence of national culture on IPO activity

              dataex OfferTo1stClose OfferSizeM pc1 pc2 Revenues

              ----------------------- copy starting from the next line -----------------------
              Code:
              * Example generated by -dataex-. For more info, type help dataex
              clear
              input double(OfferTo1stClose OfferSizeM pc1 pc2 Revenues)
               1.2499985 111.021 .3093033 -.8732357     305.7
               6.2652154 69.3451 .3093033 -.8732357       207
              -2.345e-06  25.243 .3093033 -.8732357     398.5
                9.090909 361.424 .3093033 -.8732357    1298.8
                  26.875 6.40692 .3093033 -.8732357      31.4
                    -1.3      40 .3093033 -.8732357         .
               4.7619047 9.03852 .3093033 -.8732357     133.5
               17.611944 16.1896 .3093033 -.8732357     192.5
               3.5403688  20.964 .3093033 -.8732357    5045.5
               4.5454545 301.611 .3093033 -.8732357    5045.5
               1.8918918 34.0356 .3093033 -.8732357     170.3
                22.23077 381.823 .3093033 -.8732357       706
               12.368421 1017.07 .3093033 -.8732357    1618.2
                       0 30.0883 .3093033 -.8732357     149.6
               12.899371   953.8 .3093033 -.8732357    1618.2
              -3.5294118 485.714 .3093033 -.8732357      1400
               7.2727275 299.491 .3093033 -.8732357      1202
                      .1     115 .3093033 -.8732357     415.7
                      96  1.8514  .827422  1.765444         .
                     -28  4.0805  .827422  1.765444        .3
                     -50 4.35008  .827422  1.765444         .
                     -40 9.92713  .827422  1.765444         .
                      -2  4.4005  .827422  1.765444     288.3
                     -48  7.2576  .827422  1.765444         .
              -17.500002  18.144  .827422  1.765444       6.6
              -22.500002  3.6804  .827422  1.765444         .
              -25.000002  7.4096  .827422  1.765444         .
              -20.000004   9.228  .827422  1.765444       5.6
               -16.66667 2.34677  .827422  1.765444         .
                      -6 14.1185  .827422  1.765444         .
                       0 11.2392  .827422  1.765444      38.9
                   -32.5  6.4722  .827422  1.765444      38.6
               29.999998   45.69  .827422  1.765444         .
               27.499998 1.95558  .827422  1.765444       8.2
                      20 4.41588  .827422  1.765444       2.2
               4.9999986  2.7036  .827422  1.765444        .4
                       4   8.854  .827422  1.765444         .
              -15.000001  5.3298  .827422  1.765444         .
                      10  4.3705  .827422  1.765444     113.1
                     -22  2.1895  .827422  1.765444         .
              -25.000002  3.5032  .827422  1.765444      18.9
                       5 107.723  .827422  1.765444         .
              -36.666668  2.6502  .827422  1.765444       1.5
                     -32   8.834  .827422  1.765444  .0120484
                      -2 15.4263  .827422  1.765444  .0376616
                       5  2.6445  .827422  1.765444        .2
               4.9999986  2.6208  .827422  1.765444  .0939369
               4.9999986  3.4344  .827422  1.765444         .
               9.9999981    6.92  .827422  1.765444       6.7
                     -30   4.325  .827422  1.765444       4.9
              -25.000002 2.00376  .827422  1.765444      14.8
                     -60  2.6412  .827422  1.765444         .
               14.999998  3.4976  .827422  1.765444         .
               49.999996  2.6061  .827422  1.765444      24.3
                      -4  5.6172  .827422  1.765444        .6
              -5.0000014  3.7312  .827422  1.765444         .
               8.7499981   4.657  .827422  1.765444   .072956
               34.999996  2.7807  .827422  1.765444        .2
               49.999996 2.31725  .827422  1.765444         .
                     -10  4.6025  .827422  1.765444        .6
              -1.490e-06   2.307  .827422  1.765444   .016643
               12.499998  3.7084  .827422  1.765444         .
                      20  3.7264  .827422  1.765444       1.3
               49.999996   4.646  .827422  1.765444         .
               14.999998  4.6465  .827422  1.765444       3.8
               42.499996  4.6465  .827422  1.765444         .
                       0 23.2325  .827422  1.765444         .
                      18 47.4909  .827422  1.765444      65.5
               14.999998  5.6736  .827422  1.765444      67.8
              -1.490e-06    3.79  .827422  1.765444     132.5
               49.999996  1.9082  .827422  1.765444     126.6
              -1.490e-06  5.7246  .827422  1.765444         .
               34.999996  7.6928  .827422  1.765444     215.9
                     195   9.596  .827422  1.765444         .
                      -2   23.99  .827422  1.765444         .
              -5.0000014   7.197  .827422  1.765444 .00595768
                      75 3.35825  .827422  1.765444      20.1
              -86.333336 1126.26  .827422  1.765444     661.7
               9.9999981 2.29344  .827422  1.765444  .0304684
              -7.5000014  3.8412  .827422  1.765444         .
              -2.5000014  6.6927  .827422  1.765444         .
                   -62.5 13.4801  .827422  1.765444         .
              -1.490e-06 2.38575  .827422  1.765444         .
                   -21.5 120.425  .827422  1.765444      89.7
                      -8   .9624  .827422  1.765444         .
              -1.490e-06   4.812  .827422  1.765444     271.4
                       0   8.569  .827422  1.765444         .
               19.999998  .56088  .827422  1.765444       4.4
                     -20  9.1755  .827422  1.765444         .
                       2 8.48875  .827422  1.765444      63.5
              -1.490e-06  10.864  .827422  1.765444         .
              -64.400002  3.0555  .827422  1.765444      68.8
               19.999998 1.01985  .827422  1.765444  .0689736
               14.999998  1.2878  .827422  1.765444  .0465797
              -15.000001   .6404  .827422  1.765444       2.9
                      14  3.2225  .827422  1.765444  .0910538
                      10  10.127  .827422  1.765444      26.8
               7.4999986 3.63465  .827422  1.765444         .
              -20.000002  2.5197  .827422  1.765444         .
                      14 134.787  .827422  1.765444     720.3
              end

              Comment


              • #8
                Tapan:
                provided that you are not planning to use time-series related commands (such as lags and leads), you can -xtset- your dataset with -panelod- only.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Is it possible to run a random effect regression simply based on panel identification i.e., one variable? Secondly, will applying lags or leads can fix my repeated time value error? Thank you!!!

                  Comment


                  • #10
                    Is it possible to run a random effect regression simply based on panel identification i.e., one variable?
                    Yes. You do not need to -xtset- a time variable just to do a random effects regression.

                    Secondly, will applying lags or leads can fix my repeated time value error?
                    No! In fact, this is precisely where you will encounter problems from not -xtset-ing a time variable. Lags and leads do not exist when there are repeated time value within panels. They are mathematically undefinable unless panel and time uniquely identify observations. So applying "lags or lags" will be impossible unless you have already -xtset- with two variables.

                    So if you are anticipating further analysis that uses lags and leads, then you need to fix the repeated time values problem in your data. Usually the problem is that you are thinking about the panel variable or the time variable incorrectly. Ask yourself why you have multiple observations for the same country in the same year? Perhaps each observation represents a different geographic unit (state, county, province, region, whatever) in the country. If so, then you need to use -egen, group()- to create a new variable that reflects both the country and that smaller geographic unit, and use that as the panel variable in -xtset-. (Read -help egen- and scroll down to the -group()- function if you are not familiar with this extremely useful Stata function.) Or perhaps the multiple observations for the country in the same year represent shorter time units such as months or quarters or weeks, or even days. In that case, you need a new date variable that incorporates that information, which you would then use as the time variable in -xtset-.

                    Comment


                    • #11
                      Got it, Thank you!! I gave a lot of thought and I belive I need multivariate regression with control for year-fixed effects and industry/country-fixed effects. Is it possible to run that, please guide me on that as well?
                      Also the code I am using is as follows:

                      --reghdfe OfferTo1stClose pc1 pc2 OfferSizeM Revenues ReturnonCommonEquity TotalDebtTotalEquity CapitalExpenditures , absorb(year_only Country) vce(robust)--


                      Comment


                      • #12
                        Your code contradicts what you say in your first sentence. With -reghdfe- what you put in -absorb()- is what are the fixed effects for the analysis. If you want industry/country fixed effects, then you want to do this:
                        Code:
                        egen industry_country = group(country industry)
                        reghdfe OfferTo1stClose ..., absorb(year_only industry_country)
                        Also, you should use -vce(industry_country)- assuming you have a sufficient number of such clusters.

                        Comment


                        • #13
                          Fair enough and it worked. I got the regression output. Thank you again! However, if you don't mind, could you give your feed back on the following code I run on control variables to make them normally distributed? As far as I studied for any parametric you have to make sure your variables are normally distributed, am I right or wrong? Please share your light on it!!

                          Codes:
                          ---gen log10_Revenues = log10(Revenues)
                          gen log10_ReturnonCommonEquity = log10(ReturnonCommonEquity)---

                          Comment


                          • #14
                            Tapan:
                            normality is a (weak) requirement for residual distribution only.
                            Kind regards,
                            Carlo
                            (Stata 19.0)

                            Comment


                            • #15
                              Noted Thank you, but the paper I am considering for my methodology has taken a log of offer size and GDP, so can I do a log for two variables or it will be a statistical wrong log for just two variables?

                              Paper name: Cross-country IPOs/ What explains differences in underpricing?
                              Journal Name: Journal of Corporate Finance

                              Best Regards,
                              Tapan

                              Comment

                              Working...
                              X