Thursday, 8 October 2015

Least Square Dummy Variable Model (LSDV)

                                    k
                  Yit = β1+  ∑   βj  Xijt + gt + αi + i
                                                   j=2



                             k                        n
                  Yit =  ∑   βj Xijt + gt  +∑ αiDi + i
                                         j=2                                i=1

The above model called least square dummy variable model which is extension of fixed effect model, this also include explicity of unobserved effect we can conclude from above equation that Di is a dummy variable, if Di is equals to 1 that means that these observation belong to country one (in this example our entity is countries) so the final model would be that unobserved effect is converted into co-efficient of the countries dummy variables, αiDi is shows a fined effect  on  dependent variable Yi for country i (which is fixed effect approach), it can be uses through OLS approach.
Note: if it is included dummy for each country along with intercept than we would face dummy variable trap or perfect multicollinearity. To avoid perfect multicolinearity, we normally put 1st country as bench mark country meaning the intercept shows slop of 1st country. In the above model, β1 represent the intercept of 1st country and ai represent the intercept of remaining countries. we have also option to drop intercept meaning β1 and put dummy for all countries then there will be no issue of perfect multicollinearity because ai shows the intercept for each country. 

Cross section-wise intercept
MXPit = β1 + β2POP1t + β3CTP1t + δ2D2i + δ3 D3t + δ4 D4it + δ5 D5i + i
As Gujrathi says in his book basics economitrics in chapter 17, to find country wise coefficient we have to multiplying coefficient of country dummy with parameters of that model to find country wise intrepation or coefficients. Though its consume degree of freedom
Country wise coefficients


MXPit = β1 + β2POP1t + β3CTP1t + δ2 (D2*POP2t) + δ2 (D2*CTP2t) + δ3 (D3*POP3t) + δ3 (D3*CTP3t) + δ4 (D4*POP4t) + δ4 (D4*CTP4t) + δ5 (D5*POP5t) + δ5 (D5*CTP5t) + i

Sunday, 23 August 2015


Panel Data Models Analysis
A general model that pools time series and cross section data is
                              k
Yit =  Yit =αi +βt ∑γi,k  Xk,i, t + i, t
                                        k=0
where i=1,…, N (number of cross sections, e.g., countries); t=1,…, T (number of time periods, e.g., years); and K = number of explanatory variables. Note that this model gives each state its own intercept. Let suppose Pakistan have high growth rate holding other thing constant so this model allow each year have its own effect (βt).
Different models are derived by making various assumptions concerning the parameters of this model. If we assume that  α1 = α2 = = αN,  β1 = β2 = βt … , and  γ1,k = γ2,k = = γN,k … then we have the OLS model.
If we assume that the  αi and  βt not all equal but are fixed numbers (and that the coefficients i,k  are constant across countries, i) then we have the fixed effects (FE) model. This model is also called the least squares dummy variable (LSDV) model, the covariance model, and the within estimator. If we assume that the αi and  βt are random variables, still assuming that the γi are all equal, then we have the random effects (RE) model also known as the variance components model or the error components model. Finally, if we assume the coefficients are constant across time, but allow the k, αi and k, γi to vary across countries and assume that  βt = = βt = 0… , then we have the random coefficients model.


The Fixed Effects Model
Let’s assume that the coefficients on the explanatory variables k,i,t x are constant across countries and across time. The model therefore reduces to

                    k
Yit =αi +βt ∑  γk  Xk,i, t + i, t
                           k=0             


i will explain fixed effect model with dummy variables in next blog.....nshallah

            

Wednesday, 12 August 2015

panel dataset

Here we have six countries (N=6), time period is ten years (T=10), and total observations for all cross section (n=60)......  MTBit = β1i + β2GDPit + β3FDIit + uit
i = 1, 2, 3, 4 , 5, 6
t = 1, 2, . . . , 10     (in this case we have balance panel because all cross sections have same no.of observations)




Y         X MTB GDP FDI
PAK 2003 787.559 4.846321 0.641482
PAK 2004 1269.373 7.368571 1.141075
PAK 2005 1686.355 7.667304 2.010007
PAK 2006 1776.939 6.177542 3.112978
PAK 2007 1935.882 4.832817 3.668323
PAK 2008 1938.001 1.701405 3.19736
PAK 2009 2058.056 2.831659 1.390402
PAK 2010 2149 1.606681 1.137498
PAK 2011 2271.493 2.785944 0.611993
PAK 2012 2281.139 4.015908 0.379172
CHN 2003 61898.34 10 3.0139
CHN 2004 74725.44 10.1 3.215294
CHN 2005 67245.26 11.3 4.612902
CHN 2006 84810.5 12.7 4.573693
CHN 2007 103823 14.2 4.471861
CHN 2008 115942 9.6 3.793481
CHN 2009 108799.9 9.2 2.625733
CHN 2010 130290.4 10.4 4.109303
CHN 2011 139736.2 9.3 3.825112
CHN 2012 155017.4 7.8 3.080975
MYS 2003 10210.15 5.788499 2.244197
MYS 2004 11510.93 6.783438 3.70679
MYS 2005 12197.75 5.332139 2.734411
MYS 2006 13419.05 5.585031 4.727159
MYS 2007 14828.84 6.298426 4.686767
MYS 2008 16093.95 4.832106 3.27832
MYS 2009 15922.8 -1.51368 0.056694
MYS 2010 18267.48 7.425006 4.397632
MYS 2011 19912.89 5.127731 5.226933
MYS 2012 20866.88 5.639832 3.191007
IND 2003 3916.814 7.860381 0.699071
IND 2004 4332.863 7.922937 0.799808
IND 2005 4982.092 9.284832 0.871407
IND 2006 6141.148 9.263965 2.11029
IND 2007 7398.211 9.80136 2.03663
IND 2008 7672.457 3.890957 3.545988
IND 2009 8014.487 8.479784 2.605983
IND 2010 9752.908 10.54639 1.601306
IND 2011 9983.94 6.330518 1.94884
IND 2012 9826.249 3.236943 1.302903
IDN 2003 5176.982 4.780369 -0.25426
IDN 2004 5369.297 5.030874 0.738244
IDN 2005 5503.176 5.692571 2.916115
IDN 2006 4316.296 5.500952 1.347943
IDN 2007 6582.91 6.345022 1.603011
IDN 2008 7404.831 6.013703 1.826272
IDN 2009 7255.005 4.628874 0.90392
IDN 2010 8482.636 6.223852 1.941731
IDN 2011 9044.435 6.490403 2.273462
IDN 2012 9324.792 6.226484 2.234292
MEX 2003 1693.791 1.422666 2.569233
MEX 2004 1903.345 4.295717 3.203474
MEX 2005 2144.345 3.032576 2.80973
MEX 2006 2680.374 5.001383 2.095244
MEX 2007 1661.288 3.148224 3.023797
MEX 2008 3312.717 1.400294 2.522915
MEX 2009 2874.313 -4.70034 1.854535
MEX 2010 3693.956 5.066466 2.154226
MEX 2011 3893.946 3.982328 2.030629
MEX 2012 4243.651 3.784251 1.311688