Upload
tirtha-patel
View
226
Download
0
Embed Size (px)
Citation preview
8/18/2019 Functional Form (Lecture Handout)
1/21
Handout 6: Functional Form
In which you learn how to use OLS to model economic events that may be non-linear. In so doing you learn how to estimate the economic concept of elasticities (of demand, income etc) and how to test for appropriate functional form of your
model
So far considered models written in linear formY = b0 + b1X + u (1)
Implies a straight line relationship between y and X
Sometimes economic theory and/or observation of data will suggest that the relationshipbetween variables is non linear
8/18/2019 Functional Form (Lecture Handout)
2/21
2
One way to model a non-linear relationship is the equation
Y = a + b/X + e (2)
(where the line asymptotes to the value “a” as X ↑ - from below if b0)
However this is not a linear equation, unlike (1), since it does not trace out a straight linebetween Y and X and OLS only works (ie minimise RSS) if can somehow make (2) linear.
- The solution is to use algebra to transform equations like (2) so appear like (1)
In the above example do this by creating a variable equal to the reciprocal of X, 1/X, sothat the relationship between y and 1/X is linear (ie a straight line)
Y = a + b*(1/X) + e (3)
(3) is now linear in parameters
The only thing now need to be careful about is how to interpret the coefficients from thisspecification, since now
dY/d((1/X) = b but dY/dX = -b/X2
Log Linear Models
A useful functional form isY = b0Xb1exp(u)
To male this model linear in parameters take (natural) logs so that
LnY = Lnb0 + b1LnX + u (4)This is a useful specification because the estimated coefficients can be interpreted aselasticities
Since dLnY/dY = 1/Y then dLnY = dY/Y
which is the % change in y÷
100
Similarly
dLnX=dX/X is the % change in X ÷ 100
From (4)
dLnY/dLnX = b1 = (dY/Y)/(dX/X)
so b1 = % Δ in Y/ % Δ in X
= elasticity of y wrt X
8/18/2019 Functional Form (Lecture Handout)
3/21
3
8/18/2019 Functional Form (Lecture Handout)
4/21
4
Example. Using the food.dta file (posted on the course web site)
use f ood. dt a
r eg f ood gr i nc
Source | SS df MS Number of obs = 200- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - F( 1, 198) = 60. 29
Model | 50055. 4304 1 50055. 4304 Pr ob > F = 0. 0000Resi dual | 164391. 019 198 830. 257671 R- squar ed = 0. 2334
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adj R- squar ed = 0. 2295 Tot al | 214446. 449 199 1077. 62035 Root MSE = 28. 814
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -f ood | Coef . St d. Er r . t P>| t | [ 95% Conf . I nt er val ]
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -gr i ncno | . 0171574 . 0022097 7. 76 0. 000 . 0127999 . 021515
_cons | 57. 59873 3. 00802 19. 15 0. 000 51. 66686 63. 5306- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
predict fhat /* will give predicted (fitted) values for this model */
Now t r y Food = a + b( 1/ I ncome) + u
g onei nc=1/ gr i nc
r eg f ood onei nc
Source | SS df MS Number of obs = 200- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - F( 1, 198) = 82. 99
Model | 63337. 7437 1 63337. 7437 Pr ob > F = 0. 0000Resi dual | 151108. 706 198 763. 175281 R- squar ed = 0. 2954
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adj R- squar ed = 0. 2918
Tot al | 214446. 449 199 1077. 62035 Root MSE = 27. 626- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
f ood | Coef . St d. Er r . t P>| t | [ 95% Conf . I nt er val ]- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
onei nc | - 12440. 58 1365. 594 - 9. 11 0. 000 - 15133. 56 - 9747. 606 _cons | 97. 26136 3. 147255 30. 90 0. 000 91. 05492 103. 4678
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
predict fhat2 /* will give predicted (fitted) values for this model */
New model is a better fit (compare the R2 )
Coefficient now says if income increases by £1, food expenditure changes bydFood/dIncome = -b/Income2
(just differentiate the Food eqn.
Note that a non-linear effect is not constant – unlike a straight line – so slope effect willchange as value of income changes
8/18/2019 Functional Form (Lecture Handout)
5/21
5
8/18/2019 Functional Form (Lecture Handout)
6/21
6
Often a graph is useful to show the fitted lines from different models
t wo ( scat t er f ood gr i nc, yt i t l e( f ood) ) ( l i ne f hat gr i nc, cl pat t ern( l i ne) ) ( l i nef hat 2 gr i nc, cl pat t er n( dash) )
0
5 0
1 0 0
1 5 0
2 0 0
f o o d
0 2000 4000 6000 8000gross normal weekly household income
weekly household food expenditure Fitted values
Fitted values
Now try a logarthimic model
g l f =l og( f ood)g l i =l og( gr i ncno)
r eg l f l i
Source | SS df MS Number of obs = 200- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - F( 1, 198) = 113. 73
Model | 16. 7099146 1 16. 7099146 Pr ob > F = 0. 0000Resi dual | 29. 0921232 198 . 146929915 R- squar ed = 0. 3648
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adj R- squar ed = 0. 3616 Tot al | 45. 8020378 199 . 230160994 Root MSE = . 38331
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -l f | Coef . St d. Er r . t P>| t | [ 95% Conf . I nt erval ]
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -l i | . 3725856 . 0349377 10. 66 0. 000 . 3036879 . 4414833 _cons | 1. 747382 . 2323849 7. 52 0. 000 1. 289115 2. 205649
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
pr edi ct l hat
g ehat =exp( l hat ) / * t hi s wi l l change a l og val ue i nt o a l evel */
8/18/2019 Functional Form (Lecture Handout)
7/21
7
8/18/2019 Functional Form (Lecture Handout)
8/21
8
t wo (scat t er f ood gr i nc, yt i t l e( f ood) ) ( l i ne f hat gr i nc, cl pat t ern( dash) ) ( l i neehat gr i nc)
0
5 0
1 0 0
1 5 0
2 0 0
f o o d
0 2000 4000 6000 8000gross normal weekly household income
weekly household food expenditure Fitted values
ehat
Semi-Log Models
Another common functional form is the semi-log model(log-lin model) in which the dependent variable is measured in logs and the X variables inlevels
X y 1exp0
β β =
Taking (natural) logs gives
LogY = Logβ0 + β1Xlog(exp)
which since log(exp) = 1 gives
LogY = Logβ0 + β1X
The interpretation of the estimated coefficient β1 is
X
Y dy
dX
ydLog== 1
)( β
= % change in y /100 w.r.t. unit change in X
This is called a semi-elasticity
8/18/2019 Functional Form (Lecture Handout)
9/21
9
So if, for example, wage and age are related by
Agewage Log 050.05.3)(^
+=
then the % change in wages following a unit increase in age (ie 1 year)
= (0.050*1)*100 = 0.05 = 5%
Also useful for variables like the level of GDP which looks like this over time
0
5 0 0 0 0 0
1 0 0 0 0 0 0
g d p
1950 1960 1970 1980 1990 2000year
The semi-log model:
Log(GDP) = a + bYear + u
Implies that the coefficient b gives the (constant) growth rate over the period
Using the data set gdp.dta (posted on the course web site)
use gdp. dta
g l gdp=l og( gdp) / * cr eat e l og of gdp */
Est i mat e semi - l og model usi ng OLS
r eg l gdp year
Source | SS df MS Number of obs = 56- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - F( 1, 54) = 3149. 93
Model | 123. 799553 1 123. 799553 Pr ob > F = 0. 0000Resi dual | 2. 12232554 54 . 039302325 R- squar ed = 0. 9831
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adj R- squar ed = 0. 9828 Tot al | 125. 921878 55 2. 2894887 Root MSE = . 19825
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -l gdp | Coef . St d. Er r . t P>| t | [ 95% Conf . I nt er val ]
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -year | . 0919893 . 001639 56. 12 0. 000 . 0887033 . 0952754
_cons | - 170. 0515 3. 238013 - 52. 52 0. 000 - 176. 5433 - 163. 5597- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OLS estimate on year variable says that (nominal) GDP in the UK has been growing byaround 9% a year
8/18/2019 Functional Form (Lecture Handout)
10/21
10
8/18/2019 Functional Form (Lecture Handout)
11/21
11
Testing Functional FormIf want to compare goodness of fit of models in which the dependent variable is in logs orlevels then cant just look at the R2. The TSS in Y is not the same as the TSS in LnY, socomparing R2 is not valid. The basic idea behind testing for the appropriate functional formof the dependent variable is to transform the data so as to make the RSS comparable
Do this by1. dividing each observation by the geometric mean
where geometric (rather than arithmetic) mean
= (y1*y2*…yn)1/n = exp1/nLn(y1*
y2…y
n)
2. rescale each y observation by dividing by this value
yi* = yi /geometric mean
3. regress y* (rather than y) on X, save RSSregress Lny* (rather than Lny) on X, save RSS
the model with the lowest RSS is the one with the better fit
More formally
BoxCox = N/2*log(RSSlargest/RSSsmallest) ~ χ2(1)
If estimated value exceeds critical value (from tables Chi-squared at 5% level with 1degree of freedom is 3.84) reject the null hypothesis that the models are the same(ie there is a significantly different in terms of goodness of fit).
Example (Box-Cox Test)
. u boxcox / * r ead i n dat a */
The dat a cont ai ns i nf o on GDP and empl oyment growt h f or 21 count r i es
. su empl gdpVar i abl e | Obs Mean Std. Dev. Mi n Max
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
empl | 21 1. 108095 . 8418647 . 02 3. 02gdp | 21 3. 059524 1. 625172 1. 15 7. 73
The dat a show t hat gdp and empl oyment growt h ar e measur ed i n percent age poi nt s,wi t h a maxi mumof 7. 73 %poi nt annual GDP growt h and a mi ni mum1. 15% poi nts.
8/18/2019 Functional Form (Lecture Handout)
12/21
12
8/18/2019 Functional Form (Lecture Handout)
13/21
13
A l i near r egr essi on gi ves
. r eg empl gdpSource | SS df MS Number of obs = 21
- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - F( 1, 19) = 26. 97Model | 8. 31618159 1 8. 31618159 Pr ob > F = 0. 0001
Resi dual | 5. 85854191 19 . 308344311 R- squar ed = 0. 5867- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adj R- squared = 0. 5649 Tot al | 14. 1747235 20 . 708736175 Root MSE = . 55529
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -empl | Coef . St d. Er r . t P>| t | [ 95% Conf . I nt er val ]
- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -gdp | . 396778 . 0764018 5. 193 0. 000 . 2368672 . 5566888
_cons | - . 1058566 . 2632937 - 0. 402 0. 692 - . 6569367 . 4452235
Gdp i s measur ed i n percent age poi nt s, dempl / dgdp = βgdp and hence dempl = βgdp* dgdp so a 1 % point r i se i n gdp gr owt h rai ses empl oymentgr owt h by 0. 4 poi nt s a year
and a l og- l i n speci f i cat i on gi vesg l empl =l og( empl ) / * gener at e l og of dep. Var i abl e */
. r eg l empl gdpSource | SS df MS Number of obs = 21
- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - F( 1, 19) = 5. 89Model | 6. 84252682 1 6. 84252682 Pr ob > F = 0. 0253
Resi dual | 22. 0706507 19 1. 1616132 R- squar ed = 0. 2367- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adj R- squared = 0. 1965
Tot al | 28. 9131775 20 1. 44565888 Root MSE = 1. 0778- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
l empl | Coef . St d. Er r . t P>| t | [ 95% Conf . I nt er val ]- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
gdp | . 35991 . 1482915 2. 427 0. 025 . 0495322 . 6702877 _cons | - 1. 436343 . 5110381 - 2. 811 0. 011 - 2. 505958 - . 3667282
l og- l i n model so coef f i ci ent s ar e gr owt h r at es. Thi s t i me dl empl / dgdp = βgdp and hence dl empl = βgdp* dgdp wher e dl empl = % change i n gdp/ 100.So a 1% point ( not a 1 %) r i se i n gdp gr owt h rai ses emp gr owt h by 36% a year( f r om t abl e of means above, can see a 35% i ncr ease i n gdp amount s t o ar ound 0. 36per cent age poi nt s of extr a gr owt h a year – whi ch i s si mi l ar t o est i mat e i nl evel s )
Looks l i ke l i near speci f i cat i on i s pr ef er r ed, but s i nce R2 or RSS not compar abl euse Box- Cox t est t o test f ormal l y
Get geomet r i c mean. means empl
Vari abl e | Type Obs Mean [ 95% Conf . I nt erval ]- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
empl | Ar i t hmet i c 21 1. 108095 . 724883 1. 491307| Geomet r i c 21 . 7152021 . 413749 1. 236291
Rescal e l i near dependent var i abl e and l og of dependent var i abl e
. g empadj =empl / . 715
. g l empadj =l og( empadj )
Regr ess adj ust ed dependent var i abl es on gdp and l og( gdp) r espect i vel y
8/18/2019 Functional Form (Lecture Handout)
14/21
14
8/18/2019 Functional Form (Lecture Handout)
15/21
15
. r eg empadj gdp
Source | SS df MS Number of obs = 21- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - F( 1, 19) = 26. 97
Model | 16. 2671653 1 16. 2671653 Pr ob > F = 0. 0001Resi dual | 11. 4598119 19 . 603147995 R- squar ed = 0. 5867
- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adj R- squared = 0. 5649 Tot al | 27. 7269772 20 1. 38634886 Root MSE = . 77663
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -empadj | Coef . St d. Er r . t P>| t | [ 95% Conf . I nt er val ]
- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -gdp | . 5549343 . 1068557 5. 193 0. 000 . 3312828 . 7785858
_cons | - . 1480511 . 368243 - 0. 402 0. 692 - . 9187925 . 6226903
. r eg l empadj gdp
Source | SS df MS Number of obs = 21- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - F( 1, 19) = 5. 89
Model | 6. 84252671 1 6. 84252671 Pr ob > F = 0. 0253Resi dual | 22. 0706501 19 1. 16161317 R- squar ed = 0. 2367- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adj R- squared = 0. 1965
Tot al | 28. 9131769 20 1. 44565884 Root MSE = 1. 0778
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -l empadj | Coef . St d. Er r . t P>| t | [ 95% Conf . I nt er val ]
- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -gdp | . 35991 . 1482915 2. 427 0. 025 . 0495322 . 6702877
_cons | - 1. 100871 . 5110381 - 2. 154 0. 044 - 2. 170486 - . 0312554
Now RSS are compar abl e, and can see l i near i s pref err ed.
For mal t est of si gni f i cant di f f er ence bet ween t he 2 speci f i cat i ons
. g t est =( 21/ 2) *l og( 22. 1/ 11. 5) = N/ 2l og( RSSl argest / RSSsmal l est) ~ χ2(1)
/ * st at a r ecogni ses “l og” as Ln or l oge */
. di t est
6. 86
Gi ven t est i s Chi - Squared wi t h 1 degree of f r eedom. Est i mated val ue exceedscri t i cal val ue ( f r om t abl es Chi - squar ed at 5% l evel wi t h 1 degr ee of f r eedom i s3. 84) so model s ar e si gni f i cant l y di f f er ent i n t er ms of goodness of f i t .
8/18/2019 Functional Form (Lecture Handout)
16/21
16
8/18/2019 Functional Form (Lecture Handout)
17/21
17
Test for Normality of Residuals
All the hypotheses, tests and confidence intervals done so far are based on theassumption that the (unknown true) residuals are normally distributed. If not then tests areinvalid
When choosing a functional form better to choose one which gives normally distributederrors
Do this by looking at the OLS residuals Since can show that if all Gauss-Markov assumptions are satisfied (see earlier notes) thenthe OLS residuals are also asymptotically normally distributed (ie approximately normal ifsample size is large)
A normal distribution should have following properties- symmetric about its mean (in the case of OLS residuals the mean will be zero)
A Non-symmetric distribution is said to be skewed. Can measure this by looking at the 3rd moment of the normal distribution relative to the 2nd (the mean is the 1st moment, the variance is the second moment)
ndmoment cubeof
rdmoment squareof
X E
X E Skewness
X
X
2
3
])([
])([32
23
=−
−=
µ
µ
Symmetry is represented by a value of zero for the skewness coefficient
Right skewness gives a value > 0 (more values clustered to close to left of mean and afew values a long way to the right of the mean tend to make the value >0)
Left skewness gives a value < 0
A distribution is said to display kurtosis if the height of the distribution is unusual (suggestsobservations more bunched or more spread out than should be). Measure this by
ndmoment squareof
thmoment
X E
X E Kurtosis
X
X
2
4
])([
)(22
4
=−
−=
µ
µ
A normal distribution should have a kurtosis value of 3
Can combine both these features to give the Jarque-Bera Test for Normality (inresiduals)
−+=
24
)3(
6*
22KurtosisSkewness
N JB
Can show that this is asymptotically Chi2 distributed with 2 degrees of freedom (1 for
skewness and 1 for kurtosis)
8/18/2019 Functional Form (Lecture Handout)
18/21
18
8/18/2019 Functional Form (Lecture Handout)
19/21
19
If estimated chi-squared > chi-squaredcritical
reject null that residuals are normally distributed
(If not suggests should try another functional form to try and make residuals normal,otherwise t stats may be invalid).
Exampl e: Jarque-Bera Test for Normality (in residuals)
. u wage / * r ead i n data */
1st r egr ess hour l y pay on year s of experi ence and get r esi dual s
. r eg hourpay xperSource | SS df MS Number of obs = 379
- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - F( 1, 377) = 7. 53Model | 136. 061219 1 136. 061219 Pr ob > F = 0. 0064
Resi dual | 6815. 41926 377 18. 0780352 R- squar ed = 0. 0196- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adj R- squared = 0. 0170
Tot al | 6951. 48048 378 18. 39016 Root MSE = 4. 2518- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -hour pay | Coef . St d. Er r . t P>| t | [ 95% Conf . I nt er val ]
- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -xper | . 0487259 . 017761 2. 743 0. 006 . 0138028 . 083649
_cons | 7. 26455 . 4333534 16. 764 0. 000 6. 412457 8. 116642- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
. pr edi ct res, r es i d
Check hi st ogr amof r esi dual s usi ng t he f ol l owi ng st ata command
. hi st r es, nor mal bi n( 50)/ * nor mal opt i on super i mposes a normal di st r i but i on on t he gr aph */
Resi dual s show si gns of r i ght skewness ( r esi dual s bunched t o l ef t – notsymmet r i c) and kur t osi s ( l ept okur t i c – si nce peak of di st r i but i on hi gher t hanexpect ed f or a nor mal di st r i but i on)
F r a c t i o n
Residuals-6.58027 20.4404
0
.073879
8/18/2019 Functional Form (Lecture Handout)
20/21
20
8/18/2019 Functional Form (Lecture Handout)
21/21
To t est mor e f or mal l y
. su res, det ai l
Resi dual s- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Per cent i l es Smal l est1% - 6. 253362 - 6. 5802685% - 4. 919813 - 6. 372607
10% - 4. 27017 - 6. 313276 Obs 37925% - 3. 011451 - 6. 253362 Sumof Wgt . 379
50% - . 9261839 Mean 1. 11e- 08Largest St d. Dev. 4. 246199
75% 1. 869452 16. 509790% 5. 383683 17. 73377 Var i ance 18. 0302195% 7. 480312 17. 9211 Skewness 1. 5055599% 16. 5097 20. 44043 Kurt osi s 6. 432967
Construct Jarque-Bera test
. jb = (379/6)*((1.50555^2)+(((6.43-3)^2)/4))
= 328.9
The statistic has a Chi2 distribution with 2 degrees of freedom, (one for skewness one forkurtosis).
From tables critical value at 5% level for 2 degrees of freedom is 5.99
So JB> χ 2critical, so reject null that residuals are normally distributed.
Suggests should try another functional form to try and make residuals normal, otherwise tstats may be invalid.
Remember this test is only valid asymptotically, so it relies on having a large sample size.Users with data sets smaller than 100 observations should be wary about using this test.