Announcement

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

  • Random effect model and correcting heteroscedastic/serial correlated standard error

    Hello to everyone can see my post,

    I am running a panel model for balanced data with N = 14 and T= 21, but I have many missing observations, ending with 162 instead of 294 (only 55% of the data). I tried to interpolate some of the controlled variables but it changed the results in significance and sign. I tried multiple imputation but it turned that it is not benefitable in post estimation to choose between pooled, fixed, and random. Anyway, I proceeded with abit less variables as much as I can with the same162 observation and run Hausman (testing random vs fixed) and Breush-Bagan (testing ols vs random). It turned that random effect is the appropriate model.

    I tested for serial and found it does exist. However, I could not find a command in random effect model for testing hetero. However, I run restricted and unrestricted xtgls model (restricted for homo and unrestricted for heteo) and run LR test, yielding there is hetero. So, what is the solution for the serial correlation and possible hetero in my random effect model.

    When I add option robust, vce(cluster), cluster(country), vce(bootstrap), or vce(jackknife), it gives me so inflated std errors, ruining the significance of my explanatory variables. I noticed that the random effect model is estimated by Generalized Least Squares. Can I consider that GLS is already corrected the heteroscedastic std errors of my random effect model. However, what about the serial correlation.

    I appreciate any help of anyone can see my question.
    Also, if anyone has an idea to increase my sample size, will be very generous
    Last edited by Nariman Sayed; 20 Nov 2022, 07:32.

  • #2
    1. You have extremely few observations, and even fewer clusters. I would recommend a block bootstrap to calculate your standard errors. Alternatively, you have T>N, so perhaps Driscoll-Kraay (1998) standard errors can be used. They are robust to a lot of assumptions' violation.

    2. Do the independent variables that are of interest to you vary with time? If so, NEVER estimate a random-effects model, regardless of test results. Assumptions made for consistency are simply implausible, and any reviewer (at least in my field) would never approve of such a model; their first comment would be "I want to see a two-way fixed-effects regression". In practice, when you have panel data and all the variables of interest are time-varying, always estimate a two-way fixed-effects model (at the very minimum).

    3. You're the only one who can increase your sample size through your data collection process unfortunately, no one can do it for you. Simply go back to your data source and see if you can include more clusters and/or time periods.

    Hope this helps! Please let us know if you have any questions.

    Comment


    • #3
      firstly thanks for your reply.
      1- Alright, I will try to use this type of corrected standard errors.
      2- I am sorry I cannot get well that the independent variable vary over time, for example my control variables are GDP per capita, FDI, and such economic variables. So do you mean non stationarity, serial correlation or deterministic trend ? I tried to use mixed model ( adding years as the fixed effects with the random effects caused by countries). I found that after 4 or 5 years years dummies are significant. is that what you mean , pls?
      3- the 162 observations is the all possible years available for my region of interest in the source releasing these variables, even other similar variables from other sources has shorter years/ less countries, unfortunately. I asked if anyone has better and accepted methods for interpolation / imputing the missing data, though thanks.

      Comment


      • #4
        2. Your controls vary over time, so you can use a fixed-effects model. Example of variables that tend to not vary over time are gender or race for instance.

        Comment


        • #5
          Alright, but how can I use fe while hausman test says to run re not fe. I do not think my supervisor would accept it. As far as I know, I would go two-way fixed effects after choosing one-way fixed effect initially. Similarly, the two-way error component under random effect model is the mixed model that account for years systematic effect and countries random effect together, pls correct me if I am wrong.

          Comment


          • #6
            The Hausman test itself makes numerous completely unrealistic assumptions, such as conditional homoscedasticity (I've never seen this assumption hold).

            Furthermore, because it only partially demeans, random effects assumes that regressors are uncorrelated with time-invariant unobserved heterogeneity. This is tantamount to assuming, in a regression of earnings on education, that education is uncorrelated with e.g. ability (which also tends to be time-invariant), or intrinsic motivation, or genetic factors. No one will believe this assumption, even if you produce a given Hausman test result supporting random effects.

            Concerning one way vs two-way fixed effects, if you omit time fixed-effects, whatever the situation, a multitude of unobserved time shocks will bias your estimation. Again, if an economist were to read a paper executing a one-way fixed effect model, their first reaction would be "coefficient are biased due to inevitable time shocks".

            Comment


            • #7
              Alright, I see your point. I estimated fe and tried to detect time effect. I added i.time into the model and found no year is significant. However, when I run testparm the test is significance. However, the significance of the overall model is missing(reported as ".") I think this occurred due to the low degrees of freedom and sample size. so can I ignore this impact especially it had not changed the significance and sign of the explanatory variables. Also, again robust option changed the significance of some (but not much like re)of explanatory variables. I tried all possible options with vce but in vain. the robust / cluster(country) are less problematic. However, it its still annoying getting high std errors after robust option. shall I go for FGL or there is other options pls. Thanks in advance

              Comment


              • #8
                Block bootstrap is the only option I see with your very low sample size and number of clusters...

                Comment


                • #9
                  Dear Maxence, I changed some of the variables sources and sample has increased a bit and option robust has not ruined my results, finally ! thanks for make me rethink this solution !

                  However, when I run traditional hausman test, it gives me that re is better. However the test has not run until I changed that re model before fe. on the other hand, robust hausman test (xtoverid) gives me fe. I tested time effect using (testsparm),before adding robust option, and it was insignificant. So shall I go for one-way fixed effect. Also, is it okay to have such contradicting results between traditional and robust hausman test. did changing the order of the models affected the results. Thanks for your patience and help.

                  Comment


                  • #10
                    Hi Maxence,

                    can I make sure of the command of the two-way fixed effect. it that by adding i.time in the xtreg command, then I test the time dummies significance through testsparm, ritght ?

                    thanks in advance!

                    Comment


                    • #11
                      Nariman:
                      you're correct.
                      PS: thanks to Maxence for having carried out all the nitty-gritty about this thread!
                      Kind regards,
                      Carlo
                      (StataNow 18.5)

                      Comment


                      • #12
                        Many thanks Carlo and Maxence !!

                        Comment


                        • #13
                          Hi Carlo, can you help me in this thread pls:

                          https://www.statalist.org/forums/for...gmm-estimation

                          much appreciated !!

                          Comment


                          • #14
                            Hello,

                            I have a similar query as the original question of the thread. For my thesis, I have a panel data set of monthly Fama French 3 factor model variables and monthly temperature (dependent: excess returns of stock; independent: SMB, HML, MF and monthly temperature). N=20, T=168 (monthly). My primary aim is to see the impact of temperature.

                            Hausman test and robust Hausman test (with xtoverid) tells me Random Effects is preferred over Fixed Effects model. There is serial correlation based on Woolridge's test (xtserial), and there is heteroskedasticity based on Poi & Wiggins' test for Random Individual Estimator (RE).

                            Q1. Is the Random Effects model suitable for the dataset?
                            Q2. If yes for RE, how can I account for both serial correlation and heteroskedasticity? I am confused between xtreg (with re, mle), xtgls,.., and options for autocorrelation (ar1/psar1) that work with correcting heterskedasticity.
                            Q3. Can I address serial correlation by lagging variables, for example: L.dependent and L.temperature?

                            Help would very much appreciated!

                            https://www.statalist.org/forums/for...roskedasticity

                            Comment

                            Working...
                            X