This folder contains main m-files, m-functions, data files, etc., for the fitting of the FE-SDPD models to the data, based on the methods developed in Yang (2017, JOE Forthcoming).

Main m-Files
SDPD816_SE_App.m:   Fit SED model; Calls FnAQSE_SE.m, FnCQMLE_SE.m
SDPD816_SL_App.m:   Fit SLD model; Calls FnAQSE_SL.m
SDPD816_SLE_App.m:  Fit SLE model; Calls FnAQSE_SLE.m
SDPD816_STL_App.m:  Fit STL model; Calls FnAQSE_STL.m
SDPD816_STLE_App.m: Fit STLE model; Calls FnAQSE_STLE.m

m-functions 
FnAQSE_SE.m:    For M-Estimation of SED Model
FnFQMLE_SE.m:   For Full QMLE of SED Model (Su and Yang, 2015 JOE)
FnAQSE_SL.m:    For M-Estimation of SLD Model
FnAQSE_SLE.m:   For M-Estimation of SLE Model
FnAQSE_STL.m:   For M-Estimation of STL Model
FnAQSE_STLE.m:  For M-Estimation of STLE Model

FnCQMLE_SE.m:   For CQML-Estimation of SED Model
FnCQMLE_SL.m:   For CQML-Estimation of SLD Model
FnCQMLE_SLE.m:  For CQML-Estimation of SLE Model
FnCQMLE_STL.m:  For CQML-Estimation of STL Model
FnCQMLE_STLE.m: For CQML-Estimation of STLE Model

Fn_CMat.m:   For computing the C matrix
Fn_DMat.m:   For computing the D matrix
Fn_DMat_1.m: For computing the D_1 matrix

Other files in the folder are the data files, weights files, and readme files for each data.

Data Files and Readme Files:
cigarrete.xls:  transformed cigarrete demand data, see cigarette_readme.txt
cigar.xlsx:     original cigarette demand data, see cigar_readme.txt
Munnell.xls:    Public Capital Productivity Data, see Munnell_readme.txt
Fatality:       Fatality data, see Fatality_readme.txt

Spatial Weight Files
weight_cigarette.xls
weight_Munnell.xls
weight_Fatality.xls
