1. Choose any panel data and show/tell if your data is balanced or not. What is the time component and the entity component in the data?

library(plm)
## Warning: package 'plm' was built under R version 4.2.3
library(stargazer)
## 
## Please cite as:
##  Hlavac, Marek (2022). stargazer: Well-Formatted Regression and Summary Statistics Tables.
##  R package version 5.2.3. https://CRAN.R-project.org/package=stargazer
data("Produc", package = "plm")

is_balanced <- is.pbalanced(Produc, balance.panel = TRUE)
print(is_balanced)
## [1] TRUE

Using the ‘is.pbalanced’ function I verified the panel data in the “Produc” dataset is balanced.

column_names <- colnames(Produc)
print(column_names)
##  [1] "state"  "year"   "region" "pcap"   "hwy"    "water"  "util"   "pc"    
##  [9] "gsp"    "emp"    "unemp"
size <- function(x) {
  factor(x, levels = names(sort(table(x), decreasing = TRUE)))
}

df <- data.frame(year = Produc$year)
balanced_panel <- all(table(df$year) == max(table(df$year)))

cat("Is the panel data balanced?", balanced_panel, "\n")
## Is the panel data balanced? TRUE
# Plot the frequency of observations by year
# Plot the frequency of observations by year without ggplot
barplot(table(df$year), xlab = "Year", ylab = "Frequency", main = "Observation Frequency by Year", col = "skyblue")

Time Component: “year”: This column represents the time component. Each row in the dataset with a specific year corresponds to a specific time period.

Entity Component: “state”: This column represents the entity component. Each row in the dataset with a specific state corresponds to a specific geographic entity, i.e., a U.S. state

Overview of the data:

The dataset is a panel dataset with 816 observations and 11 variables. Each observation represents a specific combination of a state and a year, providing a panel structure for the data. Here’s an overview of the variables in the dataset:

Entity Component: state (factor): Indicates the state for each observation.

Time Component: year (factor): Represents the year for each observation.

Variables: region : the region pcap : public capital stock hwy : highway and streets water : water and sewer facilities util : other public buildings and structures pc : private capital stock gsp : gross state product emp : labor input measured by the employment in non–agricultural payrolls unemp : state unemployment rate

2. Type out meaningful estimating equation and run the OLS regression/estimate the coefficients.

We can explore the relationship between gross state product (gsp) and per capita personal income (pcap) while accounting for potential fixed effects.

The estimating equation is given by: \(gsp\) = \(\beta_0 + \beta_1*pcap + \epsilon\)

where: \(gsp\) is the gross state product \(pcap\) is the per capita personal income, \(\beta_0\) is the intercept, \(\beta_1\) is the coefficient for per capita personal income, \(\epsilon\) is the error term.

ols_mod <- lm(data = Produc, formula = gsp ~ pcap)

# Summary of OLS regression
summary(ols_mod)
## 
## Call:
## lm(formula = gsp ~ pcap, data = Produc)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -82383  -4637  -1212   3278 125096 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -133.38588  807.22707  -0.165    0.869    
## pcap           2.44233    0.02159 113.111   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 17120 on 814 degrees of freedom
## Multiple R-squared:  0.9402, Adjusted R-squared:  0.9401 
## F-statistic: 1.279e+04 on 1 and 814 DF,  p-value: < 2.2e-16

The coefficient for pcap is 2.44233. This suggests that, on average, a one-unit increase in per capita personal income is associated with a 2.44233-unit increase in gross state product. Therefore, the coefficients make sense. The p-value for pcap is very low, indicating that the coefficient for pcap pcap is statistically significant. The Adjusted R-squared is 0.9401, suggesting that the model explains a substantial portion of the variability in the gsp.

While the model provides insights into the relationship between gross state product and per capita personal income, it’s important to consider potential omitted variable bias. Omitted variable bias may arise if there are other relevant factors influencing gross state product that are not included in the model. Fixed effects could potentially address omitted variable bias by capturing unobserved time-invariant factors at the state level that may affect both gsp and pcap.

3. Now, run a fixed effects model (there are three different ways to do so). Type out the estimating equation (pay attention to the subscript).

One-way fixed model:

\(gsp_{it}\) = \(\beta_0 + \beta_1*pcap_{it} + \alpha_i + \epsilon_{it}\)

where:

\(gsp_{it}\) is the gross state product in state i and year t, \(pcap_{it}\) is the per capita personal income in state i and year t, \(\beta_0\) is the intercept, \(\beta_1\) is the coefficient for per capita personal income, \(\alpha_i\) represents the state fixed effects, \(\epsilon_{it}\) is the error term.

lm_mod_fe_state <- lm(data = Produc, formula = gsp ~ pcap + state)

summary(lm_mod_fe_state)
## 
## Call:
## lm(formula = gsp ~ pcap + state, data = Produc)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -69429  -1791   -191   1471 110204 
## 
## Coefficients:
##                       Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         -1.297e+04  3.288e+03  -3.945 8.72e-05 ***
## pcap                 2.849e+00  1.226e-01  23.247  < 2e-16 ***
## stateARIZONA         1.417e+03  3.477e+03   0.407  0.68376    
## stateARKANSAS        8.837e+03  3.623e+03   2.439  0.01495 *  
## stateCALIFORNIA     -2.887e+04  1.506e+04  -1.917  0.05564 .  
## stateCOLORADO        9.451e+03  3.476e+03   2.719  0.00670 ** 
## stateCONNECTICUT     8.107e+03  3.458e+03   2.344  0.01932 *  
## stateDELAWARE        7.743e+03  3.816e+03   2.029  0.04282 *  
## stateFLORIDA         3.835e+03  4.427e+03   0.866  0.38659    
## stateGEORGIA         3.875e+03  3.562e+03   1.088  0.27693    
## stateIDAHO           1.070e+04  3.843e+03   2.784  0.00550 ** 
## stateILLINOIS        3.272e+03  6.328e+03   0.517  0.60529    
## stateINDIANA         1.115e+04  3.537e+03   3.153  0.00168 ** 
## stateIOWA            4.352e+02  3.460e+03   0.126  0.89993    
## stateKANSAS          6.058e+03  3.499e+03   1.731  0.08377 .  
## stateKENTUCKY       -1.587e+03  3.463e+03  -0.458  0.64686    
## stateLOUISIANA       1.596e+04  3.524e+03   4.529 6.86e-06 ***
## stateMAINE           1.109e+04  3.823e+03   2.902  0.00381 ** 
## stateMARYLAND       -8.609e+03  3.590e+03  -2.398  0.01672 *  
## stateMASSACHUSETTS   8.782e+03  3.679e+03   2.387  0.01724 *  
## stateMICHIGAN       -8.933e+03  5.221e+03  -1.711  0.08751 .  
## stateMINNESOTA      -1.008e+04  3.622e+03  -2.782  0.00553 ** 
## stateMISSISSIPPI     2.612e+03  3.538e+03   0.738  0.46065    
## stateMISSOURI        8.297e+03  3.510e+03   2.363  0.01835 *  
## stateMONTANA         6.836e+03  3.773e+03   1.812  0.07035 .  
## stateNEBRASKA       -4.116e+03  3.511e+03  -1.172  0.24139    
## stateNEVADA          1.096e+04  3.815e+03   2.874  0.00416 ** 
## stateNEW_HAMPSHIRE   1.201e+04  3.858e+03   3.113  0.00192 ** 
## stateNEW_JERSEY      2.544e+04  3.860e+03   6.592 8.08e-11 ***
## stateNEW_MEXICO      1.071e+04  3.710e+03   2.888  0.00399 ** 
## stateNEW_YORK       -9.229e+04  1.394e+04  -6.622 6.67e-11 ***
## stateNORTH_CAROLINA  1.578e+04  3.493e+03   4.516 7.30e-06 ***
## stateNORTH_DAKOTA    8.519e+03  3.824e+03   2.228  0.02616 *  
## stateOHIO           -3.872e+03  5.658e+03  -0.684  0.49397    
## stateOKLAHOMA        1.614e+04  3.504e+03   4.607 4.78e-06 ***
## stateOREGON          3.472e+03  3.491e+03   0.995  0.32018    
## statePENNSYLVANIA   -1.420e+04  6.204e+03  -2.288  0.02239 *  
## stateRHODE_ISLAND    1.118e+04  3.836e+03   2.914  0.00367 ** 
## stateSOUTH_CAROLINA  9.915e+03  3.551e+03   2.792  0.00536 ** 
## stateSOUTH_DAKOTA    6.693e+03  3.814e+03   1.755  0.07967 .  
## stateTENNESSE       -8.437e+03  3.556e+03  -2.372  0.01793 *  
## stateTEXAS           4.196e+04  7.083e+03   5.924 4.73e-09 ***
## stateUTAH            6.031e+03  3.665e+03   1.646  0.10022    
## stateVERMONT         1.001e+04  3.915e+03   2.558  0.01073 *  
## stateVIRGINIA        5.392e+03  3.586e+03   1.504  0.13307    
## stateWASHINGTON     -2.894e+04  3.934e+03  -7.355 4.90e-13 ***
## stateWEST_VIRGINIA   6.085e+03  3.604e+03   1.689  0.09168 .  
## stateWISCONSIN      -2.852e+03  3.584e+03  -0.796  0.42650    
## stateWYOMING         1.109e+04  3.839e+03   2.887  0.00400 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 10080 on 767 degrees of freedom
## Multiple R-squared:  0.9805, Adjusted R-squared:  0.9792 
## F-statistic: 801.9 on 48 and 767 DF,  p-value: < 2.2e-16

Now, the coefficient for pcap is 2.849, a one-unit increase in per capita personal income is associated with a 2.849-unit increase in gross state product. Each state has a specific coefficient representing the expected change in gsp for that state compared to the reference state. Positive coefficients indicate an increase in gsp compared to the reference state, and negative coefficients indicate a decrease.

The coefficient for pcap is highly statistically significant, indicating a strong relationship between pcap and gsp. Some state-specific coefficients are statistically significant, while others are not. This suggests that the impact of per capita personal income on gross state product varies across states.

The adjusted R-squared is 0.9792, indicating that the model explains approximately 97.92% of the variability in gsp after accounting for per capita personal income and state fixed effects. The R-squared value increased as well. The positive coefficient for pcap aligns with economic intuition, indicating that higher per capita personal income is associated with a higher gross state product. The inclusion of state fixed effects helps control for time-invariant characteristics of each state that might influence both gsp and pcap.

Two-way fixed model:

In the two-way fixed effects model, we seek to understand how variations in per capita personal income (pcap) and specific entities (states) are associated with changes in the gross state product (gsp), while accounting for unobserved state and year-specific factors. The model is expressed as follows:

\(gsp_{it}\) = \(\beta_0 + \beta_1*pcap_{it} + \alpha_i + \gamma_t + \epsilon_{it}\)

where:

\(gsp_{it}\) is the gross state product in state i and year t, \(pcap_{it}\) is the per capita personal income in state i and year t, \(\beta_0\) is the intercept, \(\beta_1\) is the coefficient for per capita personal income, \(\alpha_i\) represents the state fixed effects, \(\gamma_t\) represents the year fixed effects, \(\epsilon_{it}\) is the error term.

We hypothesize that changes in per capita personal income are associated with changes in gross state product, even after accounting for unobserved state-specific factors. The inclusion of both entity and time fixed effects allows us to control for time-invariant characteristics of each state and time-specific factors affecting all states.

lm_mod_fe_2 <- lm(data = Produc, formula = gsp ~ pcap + state + as.factor(year))

summary(lm_mod_fe_2)
## 
## Call:
## lm(formula = gsp ~ pcap + state + as.factor(year), data = Produc)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -69163  -1934    363   2329 101947 
## 
## Coefficients:
##                       Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         -4.687e+03  3.468e+03  -1.352 0.176938    
## pcap                 2.231e+00  1.599e-01  13.946  < 2e-16 ***
## stateARIZONA        -4.356e+02  3.316e+03  -0.131 0.895533    
## stateARKANSAS        3.382e+03  3.572e+03   0.947 0.344076    
## stateCALIFORNIA      4.515e+04  1.941e+04   2.326 0.020268 *  
## stateCOLORADO        7.674e+03  3.314e+03   2.316 0.020832 *  
## stateCONNECTICUT     8.061e+03  3.282e+03   2.456 0.014258 *  
## stateDELAWARE       -4.075e+02  3.899e+03  -0.105 0.916792    
## stateFLORIDA         1.779e+04  4.876e+03   3.648 0.000282 ***
## stateGEORGIA         8.189e+03  3.466e+03   2.363 0.018399 *  
## stateIDAHO           2.238e+03  3.943e+03   0.567 0.570585    
## stateILLINOIS        3.003e+04  7.655e+03   3.923 9.54e-05 ***
## stateINDIANA         1.492e+04  3.423e+03   4.358 1.50e-05 ***
## stateIOWA           -8.736e+01  3.284e+03  -0.027 0.978788    
## stateKANSAS          3.370e+03  3.354e+03   1.005 0.315344    
## stateKENTUCKY       -6.953e+02  3.290e+03  -0.211 0.832662    
## stateLOUISIANA       1.940e+04  3.400e+03   5.707 1.66e-08 ***
## stateMAINE           2.866e+03  3.910e+03   0.733 0.463831    
## stateMARYLAND       -3.742e+03  3.514e+03  -1.065 0.287328    
## stateMASSACHUSETTS   1.513e+04  3.669e+03   4.124 4.14e-05 ***
## stateMICHIGAN        1.082e+04  6.069e+03   1.783 0.074984 .  
## stateMINNESOTA      -4.632e+03  3.571e+03  -1.297 0.194944    
## stateMISSISSIPPI    -1.164e+03  3.424e+03  -0.340 0.733997    
## stateMISSOURI        1.135e+04  3.375e+03   3.362 0.000812 ***
## stateMONTANA        -7.781e+02  3.826e+03  -0.203 0.838925    
## stateNEBRASKA       -7.180e+03  3.376e+03  -2.127 0.033747 *  
## stateNEVADA          2.831e+03  3.897e+03   0.727 0.467724    
## stateNEW_HAMPSHIRE   3.374e+03  3.969e+03   0.850 0.395595    
## stateNEW_JERSEY      3.410e+04  3.971e+03   8.585  < 2e-16 ***
## stateNEW_MEXICO      3.932e+03  3.720e+03   1.057 0.290844    
## stateNEW_YORK       -2.412e+04  1.792e+04  -1.346 0.178765    
## stateNORTH_CAROLINA  1.828e+04  3.345e+03   5.466 6.28e-08 ***
## stateNORTH_DAKOTA    2.822e+02  3.912e+03   0.072 0.942517    
## stateOHIO            1.874e+04  6.703e+03   2.796 0.005301 ** 
## stateOKLAHOMA        1.330e+04  3.363e+03   3.954 8.40e-05 ***
## stateOREGON          1.065e+03  3.340e+03   0.319 0.749912    
## statePENNSYLVANIA    1.181e+04  7.479e+03   1.579 0.114738    
## stateRHODE_ISLAND    2.794e+03  3.933e+03   0.710 0.477694    
## stateSOUTH_CAROLINA  5.843e+03  3.446e+03   1.696 0.090386 .  
## stateSOUTH_DAKOTA   -1.429e+03  3.896e+03  -0.367 0.713862    
## stateTENNESSE       -4.244e+03  3.456e+03  -1.228 0.219847    
## stateTEXAS           7.318e+04  8.709e+03   8.403  < 2e-16 ***
## stateUTAH           -9.293e+01  3.643e+03  -0.026 0.979657    
## stateVERMONT         7.426e+02  4.063e+03   0.183 0.855032    
## stateVIRGINIA        1.019e+04  3.508e+03   2.904 0.003791 ** 
## stateWASHINGTON     -1.947e+04  4.094e+03  -4.755 2.38e-06 ***
## stateWEST_VIRGINIA   9.666e+02  3.538e+03   0.273 0.784798    
## stateWISCONSIN       1.911e+03  3.505e+03   0.545 0.585729    
## stateWYOMING         2.662e+03  3.938e+03   0.676 0.499281    
## as.factor(year)1971 -7.130e+02  1.957e+03  -0.364 0.715755    
## as.factor(year)1972  3.103e+02  1.969e+03   0.158 0.874817    
## as.factor(year)1973  1.811e+03  1.986e+03   0.912 0.362131    
## as.factor(year)1974  8.394e+01  2.005e+03   0.042 0.966622    
## as.factor(year)1975 -2.204e+03  2.030e+03  -1.086 0.277970    
## as.factor(year)1976 -8.160e+02  2.055e+03  -0.397 0.691381    
## as.factor(year)1977  9.612e+02  2.077e+03   0.463 0.643666    
## as.factor(year)1978  3.380e+03  2.093e+03   1.614 0.106841    
## as.factor(year)1979  4.107e+03  2.115e+03   1.942 0.052545 .  
## as.factor(year)1980  2.791e+03  2.135e+03   1.307 0.191571    
## as.factor(year)1981  3.222e+03  2.155e+03   1.495 0.135360    
## as.factor(year)1982  1.520e+03  2.168e+03   0.701 0.483286    
## as.factor(year)1983  3.350e+03  2.176e+03   1.540 0.124069    
## as.factor(year)1984  7.835e+03  2.183e+03   3.589 0.000353 ***
## as.factor(year)1985  1.024e+04  2.196e+03   4.665 3.65e-06 ***
## as.factor(year)1986  1.201e+04  2.215e+03   5.420 8.02e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9568 on 751 degrees of freedom
## Multiple R-squared:  0.9828, Adjusted R-squared:  0.9813 
## F-statistic: 669.4 on 64 and 751 DF,  p-value: < 2.2e-16

Although, the coefficient value decreased, the statistical significance and R2 of the model have increased even more with the two-way fixed model.

model_list <- list(ols_mod, lm_mod_fe_state, lm_mod_fe_2)

# Provide labels for the models
model_labels <- c("OLS", "FE - One way (state)", "FE - Two way (state-time)")

# Compare the models using stargazer
stargazer(model_list, type = "text", column.labels = model_labels)
## 
## ===================================================================================================
##                                                   Dependent variable:                              
##                     -------------------------------------------------------------------------------
##                                                           gsp                                      
##                                 OLS               FE - One way (state)    FE - Two way (state-time)
##                                 (1)                        (2)                       (3)           
## ---------------------------------------------------------------------------------------------------
## pcap                         2.442***                   2.849***                  2.231***         
##                               (0.022)                    (0.123)                   (0.160)         
##                                                                                                    
## stateARIZONA                                            1,417.043                 -435.620         
##                                                        (3,477.431)               (3,316.455)       
##                                                                                                    
## stateARKANSAS                                          8,836.930**                3,381.503        
##                                                        (3,622.879)               (3,571.735)       
##                                                                                                    
## stateCALIFORNIA                                       -28,869.110*              45,147.830**       
##                                                       (15,061.340)              (19,407.610)       
##                                                                                                    
## stateCOLORADO                                         9,450.871***               7,674.150**       
##                                                        (3,475.876)               (3,313.678)       
##                                                                                                    
## stateCONNECTICUT                                       8,106.579**               8,061.302**       
##                                                        (3,458.031)               (3,281.734)       
##                                                                                                    
## stateDELAWARE                                          7,742.605**                -407.535         
##                                                        (3,816.190)               (3,899.469)       
##                                                                                                    
## stateFLORIDA                                            3,834.969               17,789.810***      
##                                                        (4,426.758)               (4,875.994)       
##                                                                                                    
## stateGEORGIA                                            3,875.493                8,188.580**       
##                                                        (3,561.960)               (3,465.838)       
##                                                                                                    
## stateIDAHO                                            10,697.320***               2,237.565        
##                                                        (3,842.528)               (3,943.262)       
##                                                                                                    
## stateILLINOIS                                           3,271.777               30,031.580***      
##                                                        (6,328.138)               (7,654.671)       
##                                                                                                    
## stateINDIANA                                          11,153.230***             14,916.710***      
##                                                        (3,537.435)               (3,422.802)       
##                                                                                                    
## stateIOWA                                                435.169                   -87.358         
##                                                        (3,459.567)               (3,284.490)       
##                                                                                                    
## stateKANSAS                                            6,057.885*                 3,370.320        
##                                                        (3,498.744)               (3,354.405)       
##                                                                                                    
## stateKENTUCKY                                          -1,586.921                 -695.338         
##                                                        (3,462.524)               (3,289.792)       
##                                                                                                    
## stateLOUISIANA                                        15,963.330***             19,403.480***      
##                                                        (3,524.499)               (3,400.003)       
##                                                                                                    
## stateMAINE                                            11,093.310***               2,865.959        
##                                                        (3,822.683)               (3,910.283)       
##                                                                                                    
## stateMARYLAND                                         -8,609.010**               -3,742.072        
##                                                        (3,589.845)               (3,514.484)       
##                                                                                                    
## stateMASSACHUSETTS                                     8,782.245**              15,130.500***      
##                                                        (3,679.486)               (3,668.940)       
##                                                                                                    
## stateMICHIGAN                                          -8,933.172*               10,821.020*       
##                                                        (5,221.494)               (6,068.878)       
##                                                                                                    
## stateMINNESOTA                                       -10,078.560***              -4,632.223        
##                                                        (3,622.343)               (3,570.809)       
##                                                                                                    
## stateMISSISSIPPI                                        2,611.512                -1,163.844        
##                                                        (3,537.932)               (3,423.676)       
##                                                                                                    
## stateMISSOURI                                          8,296.786**              11,348.380***      
##                                                        (3,510.435)               (3,375.139)       
##                                                                                                    
## stateMONTANA                                           6,836.417*                 -778.071         
##                                                        (3,772.544)               (3,826.474)       
##                                                                                                    
## stateNEBRASKA                                          -4,116.200               -7,180.471**       
##                                                        (3,510.868)               (3,375.906)       
##                                                                                                    
## stateNEVADA                                           10,964.180***               2,831.423        
##                                                        (3,814.736)               (3,897.046)       
##                                                                                                    
## stateNEW_HAMPSHIRE                                    12,011.390***               3,373.618        
##                                                        (3,858.031)               (3,968.953)       
##                                                                                                    
## stateNEW_JERSEY                                       25,441.660***             34,096.800***      
##                                                        (3,859.558)               (3,971.481)       
##                                                                                                    
## stateNEW_MEXICO                                       10,712.840***               3,932.344        
##                                                        (3,709.609)               (3,720.231)       
##                                                                                                    
## stateNEW_YORK                                        -92,289.210***              -24,117.880       
##                                                       (13,937.090)              (17,920.510)       
##                                                                                                    
## stateNORTH_CAROLINA                                   15,775.570***             18,282.710***      
##                                                        (3,493.486)               (3,345.062)       
##                                                                                                    
## stateNORTH_DAKOTA                                      8,519.442**                 282.151         
##                                                        (3,823.523)               (3,911.680)       
##                                                                                                    
## stateOHIO                                              -3,872.339               18,742.790***      
##                                                        (5,658.491)               (6,702.743)       
##                                                                                                    
## stateOKLAHOMA                                         16,141.090***             13,298.080***      
##                                                        (3,503.559)               (3,362.952)       
##                                                                                                    
## stateOREGON                                             3,472.348                 1,065.086        
##                                                        (3,490.730)               (3,340.158)       
##                                                                                                    
## statePENNSYLVANIA                                     -14,195.330**              11,809.930        
##                                                        (6,203.522)               (7,478.970)       
##                                                                                                    
## stateRHODE_ISLAND                                     11,178.830***               2,793.617        
##                                                        (3,836.114)               (3,932.614)       
##                                                                                                    
## stateSOUTH_CAROLINA                                   9,915.473***               5,843.381*        
##                                                        (3,550.816)               (3,446.313)       
##                                                                                                    
## stateSOUTH_DAKOTA                                      6,692.960*                -1,428.932        
##                                                        (3,813.827)               (3,895.531)       
##                                                                                                    
## stateTENNESSE                                         -8,436.518**               -4,243.782        
##                                                        (3,556.319)               (3,455.961)       
##                                                                                                    
## stateTEXAS                                            41,964.560***             73,179.360***      
##                                                        (7,083.491)               (8,708.798)       
##                                                                                                    
## stateUTAH                                               6,030.915                  -92.931         
##                                                        (3,664.538)               (3,643.378)       
##                                                                                                    
## stateVERMONT                                          10,014.520**                 742.641         
##                                                        (3,915.335)               (4,063.379)       
##                                                                                                    
## stateVIRGINIA                                           5,392.290               10,187.310***      
##                                                        (3,586.047)               (3,507.875)       
##                                                                                                    
## stateWASHINGTON                                      -28,936.470***            -19,465.120***      
##                                                        (3,934.019)               (4,093.990)       
##                                                                                                    
## stateWEST_VIRGINIA                                     6,085.468*                  966.557         
##                                                        (3,603.565)               (3,538.311)       
##                                                                                                    
## stateWISCONSIN                                         -2,851.776                 1,911.150        
##                                                        (3,584.369)               (3,504.954)       
##                                                                                                    
## stateWYOMING                                          11,085.490***               2,661.946        
##                                                        (3,839.406)               (3,938.082)       
##                                                                                                    
## as.factor(year)1971                                                               -713.025         
##                                                                                  (1,957.380)       
##                                                                                                    
## as.factor(year)1972                                                                310.307         
##                                                                                  (1,968.997)       
##                                                                                                    
## as.factor(year)1973                                                               1,810.790        
##                                                                                  (1,985.804)       
##                                                                                                    
## as.factor(year)1974                                                                83.941          
##                                                                                  (2,005.307)       
##                                                                                                    
## as.factor(year)1975                                                              -2,204.030        
##                                                                                  (2,030.096)       
##                                                                                                    
## as.factor(year)1976                                                               -816.016         
##                                                                                  (2,054.757)       
##                                                                                                    
## as.factor(year)1977                                                                961.151         
##                                                                                  (2,076.967)       
##                                                                                                    
## as.factor(year)1978                                                               3,379.896        
##                                                                                  (2,093.476)       
##                                                                                                    
## as.factor(year)1979                                                              4,107.233*        
##                                                                                  (2,115.261)       
##                                                                                                    
## as.factor(year)1980                                                               2,790.613        
##                                                                                  (2,134.930)       
##                                                                                                    
## as.factor(year)1981                                                               3,221.869        
##                                                                                  (2,155.235)       
##                                                                                                    
## as.factor(year)1982                                                               1,520.366        
##                                                                                  (2,167.692)       
##                                                                                                    
## as.factor(year)1983                                                               3,349.665        
##                                                                                  (2,175.614)       
##                                                                                                    
## as.factor(year)1984                                                             7,834.846***       
##                                                                                  (2,182.975)       
##                                                                                                    
## as.factor(year)1985                                                             10,243.290***      
##                                                                                  (2,195.767)       
##                                                                                                    
## as.factor(year)1986                                                             12,005.980***      
##                                                                                  (2,214.983)       
##                                                                                                    
## Constant                     -133.386                -12,972.710***              -4,686.657        
##                              (807.227)                 (3,288.499)               (3,467.709)       
##                                                                                                    
## ---------------------------------------------------------------------------------------------------
## Observations                    816                        816                       816           
## R2                             0.940                      0.980                     0.983          
## Adjusted R2                    0.940                      0.979                     0.981          
## Residual Std. Error    17,124.400 (df = 814)      10,081.770 (df = 767)     9,567.755 (df = 751)   
## F Statistic         12,794.140*** (df = 1; 814) 801.948*** (df = 48; 767) 669.395*** (df = 64; 751)
## ===================================================================================================
## Note:                                                                   *p<0.1; **p<0.05; ***p<0.01

Coefficients change between OLS and fixed effects models due to the inclusion of fixed effects. One-Way FE accounts for state-specific effects, and Two-Way FE accounts for both state and time effects. Coefficients are not expected to be identical due to the additional control for fixed effects. The coefficients change, reflecting the impact of controlling for fixed effects.