diff --git a/Model_Estimation/Matching/propensity_score_matching.md b/Model_Estimation/Matching/propensity_score_matching.md index f4233c7d..7c196e4d 100644 --- a/Model_Estimation/Matching/propensity_score_matching.md +++ b/Model_Estimation/Matching/propensity_score_matching.md @@ -127,15 +127,14 @@ match_data = match.data(match) #Check the dimensions. dim(match_data) -##Step Four: Conduct Analysis using the new sample. -##Turn marital status into a factor variable so that we can use it in our regression -match_data = match_data %>% mutate(marital_status = as.factor(marital_status)) +#Turn married into numeric variables +match_data = match_data %>% mutate(married = 1*(marital_status == "Married")) -##We can now get the treatment effect of smoking on gross income with and without controls +##We can now get the treatment effect of smoking on married status with and without controls # Note these standard errors will be incorrect, see Caliendo and Kopeinig (2008) for fixes # https://onlinelibrary.wiley.com/doi/full/10.1111/j.1467-6419.2007.00527.x -lm_nocontrols = lm(marital_status ~ smoke, data= match_data) +lm_nocontrols = lm(married ~ smoke, data= match_data) #With controls, standard errors also wrong here -lm_controls =lm(marital_status ~ smoke+age+gender+ethnicity+marital_status, data=match_data) +lm_controls =lm(married ~ smoke+age+gender+ethnicity, data=match_data) ```