Publications by Daniel McLaughlin

Fixed effects discussion

29.11.2023

Data I chose the OECD gas dataset. Included variables are country, year, and the log values of gas consumption, per-capita income, price of gasoline, and stock of cars. I’d like to model gas consumption using cars as the independent variable. I expected the coefficient to be positive, but it was not, so I used the fixed effects approach to accou...

3479 sym 3 img 1 tbl

Panel discussion draft

28.11.2023

Data I chose the OECD gas dataset. Included variables are country, year, and the log values of gas consumption, per-capita income, price of gasoline, and stock of cars. I’d like to model gas consumption using cars as the independent variable. I expected the coefficient to be positive, but it was not, so I used the fixed effects approach to accou...

2241 sym 1 img 1 tbl

Homework 2 Econometrics

08.11.2023

First, I identified the missing variables in the dataset. If variables have many missing values, that could make our data unbalanced and negatively affect the model Three variables have missing values. Maximum missing is 6%, so I may want to impute rather than eliminate altogether. Below I’ll show the imputation process, the results of which I u...

5810 sym R (24249 sym/67 pcs) 11 img

Discussion 6 - Econometrics

10.10.2023

rm(list=ls()) 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 US_HPI <- read.csv("/Users/danielmclaughlin/Downloads/us_fred_coastal_us_states_avg_hpi_before_after_2005.csv") HPI_Linear <-...

994 sym R (2405 sym/9 pcs)

Homework 1

04.10.2023

The following is my Moneyball homework submission. To start the process, I loaded the various packages required. rm(list=ls()) 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 library(visda...

3018 sym R (492265 sym/59 pcs) 16 img

Discussion 5 - Econometrics

03.10.2023

R Markdown I. The bias of an estimator represents the difference between the mean value of the estimator and the population parameter. In other words, the bias measures how much, on average, the estimator deviates from the true parameter. Ideally that value is zero, implying that the estimator is completely unbiased. II.Both increasing the sample s...

3896 sym R (19349 sym/59 pcs) 9 img

Document

26.09.2023

Gauss-Markov assumptions described Linearity: In a single variable regression, both the parameters (Beta0 and Beta1) and variables (Y and X) should be linear. Full column rank: There should be no exact collinearity among the predictor variables i.e. the independent variables. Constant variance or homoscedasticty: the error term has the same varian...

5762 sym R (2359 sym/18 pcs) 8 img

Discussion 3 - Econometrics

18.09.2023

R Markdown I decided to pull some data from the bureau of labor statistics (BLS) for my analysis. To do this, I first installed the blsAPI package, which allows users to pull the latest data straight from the BLS website. Once I pulled the data I aligned it by date and otherwise cleaned it up prior to running the regression. Here is the link to the...

906 sym R (2124 sym/4 pcs)

Discussion 2 - Econometrics

12.09.2023

Discussion 2 I’ve chosen two datasets - “USarrests” and “statepov”. USarrests summarizes state-level crime and population characteristics in the year 1973. It’s a cross-sectional dataset. I want to look at the relationship between urban population and crime to understand: are cities more dangerous (at least in 1973 when these data were ...

2040 sym R (2316 sym/19 pcs) 4 img