# Load data
airline <- read.csv("/Users/pin.lyu/Desktop/BC_Class_Folder/Econometrics/Data_folder/PanelData.csv")
colnames(airline) <- c("Airline",
"Year",
"Total_cost",
"Output",
"Fuel_price",
"Load_factor"
)
stargazer(airline, type = 'text', title = 'Airline Cost Data Summary Statistics')
##
## Airline Cost Data Summary Statistics
## ============================================================
## Statistic N Mean St. Dev. Min Max
## ------------------------------------------------------------
## Airline 90 3.500 1.717 1 6
## Year 90 8.000 4.345 1 15
## Total_cost 90 1,122,524.000 1,192,075.000 68,978 4,748,320
## Output 90 0.545 0.534 0.038 1.936
## Fuel_price 90 471,683.000 329,502.900 103,795 1,015,610
## Load_factor 90 0.560 0.053 0.432 0.676
## ------------------------------------------------------------
Data Set contains Cost Data for U.S. Airlines, 90 Observations On 6 Firms For 15 Years, 1970-1984
Airline = Airline company name,
Year = Year,
Output = Output, in revenue passenger miles, index number,
Fuel_Price = Fuel price,
Load_Factor = Load factor, the average capacity utilization of the
fleet
Total_cost = Total cost, in $1000
Comments: Based on the preliminary browsing and summary of the data, the data is balanced.
Regression function:
# Multi-linear regression model
linear_model <- lm(Total_cost ~ Fuel_price +
Output +
Load_factor,
data = airline
)
Interpretation:
These coefficients do make sense to me. when fuel price is higher, the total cost of an airline will increases. As to why the increase in its total costs is disproportional to the increase in fuel price, I think, is because fuel distribution costs and fuel tax.
Regression function:
# Fixed effect model
fixed_effect <- plm(Total_cost ~ Fuel_price +
Output +
Load_factor,
index = c("Airline","Year"),
model = 'within',
data = airline
)
stargazer(linear_model,fixed_effect, type = 'text', title = "Summary Of The Two Models")
##
## Summary Of The Two Models
## ===================================================================
## Dependent variable:
## -----------------------------------------------
## Total_cost
## OLS panel
## linear
## (1) (2)
## -------------------------------------------------------------------
## Fuel_price 1.225*** 0.773***
## (0.104) (0.097)
##
## Output 2,026,114.000*** 3,319,023.000***
## (61,806.940) (171,354.100)
##
## Load_factor -3,065,753.000*** -3,797,368.000***
## (696,327.300) (613,773.100)
##
## Constant 1,158,559.000***
## (360,592.700)
##
## -------------------------------------------------------------------
## Observations 90 90
## R2 0.946 0.929
## Adjusted R2 0.944 0.922
## Residual Std. Error 281,559.500 (df = 86)
## F Statistic 503.118*** (df = 3; 86) 355.254*** (df = 3; 81)
## ===================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
Comment: The control factor I introduced in the fixed effect model is “Airline” and “Year”. This enables us to capture the average effect of each company on the dependent variable “Cost”, and the coefficient associated with the other variables in the model will reflect their effects net for the individual-specific effects.
After introduction of the control, we can see that the magnitude of fuel price’s influence on total cost, though still positive, decreased by 36%. In the fixed effect model, it suggests that fuel cost is not as significant contributor of the total cost as what the linear model suggest.
the coefficient of “Output” increased by 63%. This means that the marginal cost for each increase in output is, in reality, greater than what we discovered from the linear model.
The utilization of load in each fleet matters more in reducing the costs in the fixed model, as we can see that airlines can save 23% more in their costs in the fixed effect model comparing to the OLS model.