title: Fixed effects in linear regression of pooled cross-sectional data and heteroscedasticity
body: <p>I want to conduct a linear regression analysis for a scientific project. The goal is to find out whether different characteristics of Investment funds (e.g. fund size, industry concentration etc.) explain the return of a fund once its liquidated.</p>
  <p>My sample includes around 6000 observations, each representing a unique individual (Fund ID). The Data has been collected over a period of 40 years (1980-2020) and across 34 countries.
  If I understand it correctly, this represents a pooled cross-sectional data set.
  All my general predictors (x1,x2,x3...) and controlls (x1,x2,x3...) are continuous variables and so is my dependent variable (y1).</p>
  <p>Furthermore, the dataset includes year and country data for each observation (vintage year and home country of each Fund). I assume that the individual-specific effects are correlated with the independent variables, so naturally including fixed effects came to my mind.</p>
  <p>However, I am farely unexperienced in using statistical models, so a few questions came up during my research.</p>
  <ol>
  <li><p>I have read that as a first step one should conduct a Hausman test to see if a Fixed Effect or Random Effect Model should be applied. However, I have only found instructions to do this for regular panel data. Since my data consist of observations of different individuals across different points in time and countries, I wonder whether the hausman test is applicable, and if so how I conduct it.</p>
  </li>
  <li><p>In the end in want to test my model for heteroscedasticity. So far I just included Year and Country dummy variables in my model. Now when I conduct a Test for Heteroscedasticity I receive p-values above 0.05 without those dummy variables, but below 0.05 if I include them, intidacting that heteroscedasticity is present. Is this Method applicable considering my dataset, and if so should I include the dummys in the model when conducting the test for heteroscedasticity?</p>
  </li>
  </ol>
  <p>I am using R-Studio for my analysis and the current code looks as follows:</p>
  <pre><code>Model &lt;- lm(Data$y1 ~ Data$x1 + Data$x2 + Data$x3 + factor(Data$Year) + factor(Data$Country) + na.action = na.exclude)
  </code></pre>
  <p>I receive the following Model stats and results of the <code>bptest()</code>:</p>
  <pre><code>Residual standard error: 0.4552 on 954 degrees of freedom
    (49 Beobachtungen als fehlend gelöscht)
  Multiple R-squared:  0.1815,    Adjusted R-squared:  0.118 
  F-statistic: 2.859 on 74 and 954 DF,  p-value: 2.841e-13
  
  bptest(Model)
  
  studentized Breusch-Pagan test
  
  data:  Model
  BP = 84.345, df = 74, p-value = 0.1927
  </code></pre>
  <p>In comparison the results without Country and Year Dummy:</p>
  <pre><code>Residual standard error: 0.472 on 1015 degrees of freedom
  Multiple R-squared:  0.06382,   Adjusted R-squared:  0.05182 
  F-statistic: 5.322 on 13 and 1015 DF,  p-value: 2.52e-09
  
  bptest(Model)
  
  studentized Breusch-Pagan test
  
  data:  Model
  BP = 35.171, df = 13, p-value = 0.0007969
  </code></pre>