Today

Likelihood-Based Models

Maximum Likelihood Estimatior

Example: Discrete outcomes models

Random utility model

Probit and Logit

Justification of models

Computation

Empirical Example: 401K Plan Participation (Code)

#Load the Data
library(foreign)
Savingsdata<-read.dta(
  "http://fmwww.bc.edu/ec-p/data/wooldridge/401ksubs.dta")
library(lmtest)
# Run and report logit regression of pension 
# plan participation on income and wealth
(savingsplanchoice<-glm(formula=p401k~inc+nettfa+age,
        family=binomial(link="logit"),
        data = Savingsdata))

Empirical Example: 401K Plan Participation

# Run and report logit regression of pension 
# plan participation on income and wealth
(savingsplanchoice<-glm(formula=p401k~inc+nettfa+age,
        family=binomial(link="logit"),
        data = Savingsdata))

Results

## 
## Call:  glm(formula = p401k ~ inc + nettfa + age, family = binomial(link = "logit"), 
##     data = Savingsdata)
## 
## Coefficients:
## (Intercept)          inc       nettfa          age  
##   -1.622118     0.020187     0.005510    -0.007018  
## 
## Degrees of Freedom: 9274 Total (i.e. Null);  9271 Residual
## Null Deviance:       10930 
## Residual Deviance: 10180     AIC: 10190

Interpreting results

Average Partial Effects: 401k example

#Load Library to calculate marginal effects
library(mfx)
#Command runs logistic regression and calculates APEs
(spcmfx<-logitmfx(formula=p401k~inc+nettfa+age,
        atmean=FALSE,             
        robust=TRUE,
        data = Savingsdata))

Average Partial Effects: 401k example

## Call:
## logitmfx(formula = p401k ~ inc + nettfa + age, data = Savingsdata, 
##     atmean = FALSE, robust = TRUE)
## 
## Marginal Effects:
##              dF/dx   Std. Err.       z     P>|z|    
## inc     0.00368868  0.00024585 15.0038 < 2.2e-16 ***
## nettfa  0.00100688  0.00026681  3.7738 0.0001608 ***
## age    -0.00128241  0.00049759 -2.5773 0.0099587 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Consistency in Nonlinear Models Review

MLE: Identification Proof

Nonlinear Model Asymptotic Distribution: MLE Case

MLE: Distribution

MLE Inference

401K Choice Example: Inference (Code)

# Display estimates with inference 
# for 401K Logit regression
sum401k<-summary(savingsplanchoice)
library(stargazer)))
table<-stargazer(savingsplanchoice,
                 type="html",
  header=FALSE,
  no.space=TRUE, 
  title="Logistic Regression for Savings Plan Choice",
  omit.stat=c("aic"),
  font.size="small")

401K Choice Example: Inference

Logistic Regression for Savings Plan Choice
Dependent variable:
p401k
inc 0.020***
(0.001)
nettfa 0.006***
(0.001)
age -0.007***
(0.003)
Constant -1.622***
(0.111)
Observations 9,275
Log Likelihood -5,091.828
Note: p<0.1; p<0.05; p<0.01

MLE as Empirical Risk Minimizer

Efficiency

MLE Assumptions

MLE: Properties

Summary

Next Time