econometric Topic

download econometric Topic

of 20

Transcript of econometric Topic

  • 7/24/2019 econometric Topic

    1/20

    ECONOMETRIC ANALYSIS

    ASSIGNMENT

    CIA

    Submitted To:

    Mr. Anand S

    (Econometric Analysis)

    Submitted By:

    Sayon Das

    1421328MBA-F2

  • 7/24/2019 econometric Topic

    2/20

    Q1. We lea!ed Odi!ay Lea"t S#uae" o OLS i! t$e %la"". W$at ae t$e ot$e

    e"timatio! te%$!i#ue" a&ailable' (o) ae t$ey "imila o di**ee!t *om OLS' W$e!

    ae t$e"e e"timato" u"ed'

    Ans). Te ordinary least s!"are metod is a statistical metod #ic is "tili$ed %or estimatin&

    te 'ario"s "nno#n arameters in a linear re&ression model. Tis tecni!"e is alied to &et

    te *est %it in a re&ression line and "sed to identi%y te oints #ic a'e te least s!"ared

    distance %rom te re&ression line. +n ,S te c"r'e tat elains te relationsi *et#een

    eected and o*ser'ed data set *y minimi$in& s"m o% s!"ares o% de'iation *et#een o*ser'ed

    and eected 'al"es. Te oter estimation tecni!"es/-

    1. 0ei&ted least s!"ares- A secial case o% least s!"ares metod

    2. enerali$ed east S!"are3. Best linear "n*iased estimator (BE)4. Best linear "n*iased rediction (B). Minim"m Mean s!"are error (MMSE)5. 6oot mean s!"ares (6MS)

    Wei+$ted lea"t "#uae":

    A secial case o% least s!"ares #en te all te 'al"es ecet te dia&onal are n"ll. Te

    #ei&ted ,S taes te ass"mtion tat #ei&t is "nno#n and cannot andle

    a"tocorrelation.

    Ge!eali,ed Lea"t "#uae:Tis metod can a'e 7eteroscedasticity #it a"tocorrelation

    *"t te samle roerties are not no#n.

    Be"t Li!ea -!bia"ed E"timato BL-E/:

    +t in'ol'es alication o% "n*iased and e%%icient linear estimation #ic is el%"l in 'ario"s

    statistical in%erences a*o"t arameters *ased on samle statistics estimators. al"e e!"al to

    tr"e 'al"e o% o"lation arameters are ro'ide *y BE.

    B is "sed #en random data is needed %rom te o"lation set

    Mi!imum Mea! "#uae eo MMSE/: +tis an estimation metod #ic minimi$es te

    mean s!"are error(MSE) o% te %itted 'al"es o% a deendent 'aria*le9#ic is a common

    meas"re o% estimator !"ality.

    Root Mea! S#uae"RMS/: +t is a statistical meas"re #ic can *e de%ined as te s!"are

    root o% te mean o% s!"are o% a samle.

    https://en.wikipedia.org/wiki/Mean_square_errorhttps://en.wikipedia.org/wiki/Dependent_variablehttps://en.wikipedia.org/wiki/Dependent_variablehttps://en.wikipedia.org/wiki/Dependent_variablehttps://en.wikipedia.org/wiki/Mean_square_error
  • 7/24/2019 econometric Topic

    3/20

    0e can "se tese estimators in order to identi%y te data set s"c tat roer 'aria*les are

    "sed to reresent o"lation and identi%y te data sets #ic reresents in te re&ression line.

    Q0./ I. W$at i" $eteo"%eda"ti%ity'

    II. W$at oblem" )ould you *a%e i! you data a!aly"i" i* you $a&e

    $eteo"%eda"ti%ity'

    III. (o) do you dete%t it'

    I2. W$at ae t$e emedie" to it'

    Ans).

    I/ Te eteroscedasticity is re%erred to sit"ation in #ic te 'aria*ility o% a %actor is

    "ne!"al across te ran&e o% 'al"es o% a second 'aria*le #ic redicts it and resid"als

    do not a'e a constant 'ariance.

    A scatter lot o% te 'aria*les maes a cone str"ct"re or 'aria*ility o% deendent

    'aria*le #idens or narro#s as 'al"e o% te indeendent 'aria*le increases.

    Co!ditio!al (eteo"%eda"ti%ityidenti%ies 'aria*le 'olatility #ic cannot *e

    identi%ies %or %"t"re eriods and te 'olatility cannot *e redicted s"c as stoc rices9*onds etc.

    -!%o!ditio!al (eteo"%eda"ti%itycan identi%y te 'olatility %or %"t"re eriods. E&.

    Seasonal 'aria*ility s"c as sale o% #oolen clots and s#eaters.

    E3amle: 1. +ncome 's eendit"re on meals is a clear eamle o% eteroscedasticity. +% te

    income increases 'aria*ility o% %ood cons"mtion #ill increase and oor erson #ill mae a

    constant eense "rcasin& ineensi'e %ood. eole #it i&er incomes dislay &reater

    'aria*ility o% %ood cons"mtion.

    +n linear re&ression model #e tae te ass"mtion tat error term in normal distri*"tion #it

    mean : and 'ariance ;29 i.e. ar("i) < ;2 is called omoscedasticity. #en te error term

    does not a'e constant 'ariance9 i.e. ar("i) < ;2 i #e call it eteroscedasticity.

    7eteroscedasticity 'aria*les lotted in &ra aear as tey %all into normal distri*"tion

  • 7/24/2019 econometric Topic

    4/20

    #ereas in eteroscedacity te scatter as i& 'aria*ility and does not %all into normal

    distri*"tion c"r'e.

    II/.Ass"mtions o% linear re&ression model are correct9 ,S &i'e "n*iased estimates9

    7eteroscedasticity occ"rs #en 'ariance o% errors 'aries in o*ser'ations and i% errors are

    7eteroscedasticity ,S estimator remains "n*iased #ere standard errors are inconsistent.

    Te ro*lems %aced *y te data analysis o% 7eteroscedasticity are

    1. = estimator is no lon&er BE (Best inear n*iased Estimators) #ic means tat

    it as a i&er samlin& 'ariance.2. +t constantly o'erestimates te standard error.

    III/. 4ete%tio! o* (eteo"%eda"ti%ity

    a. Ga$i%al Met$od: lottin& resid"als in > ais and deendent 'aria*le ? ais te

    attern o% 7eteroscedasticity can *e detected.

    b. 5omal Met$od

    W$ite Te"t"/ Te #ite test is a statistical test tat esta*lises resid"al 'ariance o% %actor

    in a re&ression model in constant and is estimator %or eteroscedasticity consistent

    standard errors. 6 s!"are

  • 7/24/2019 econometric Topic

    5/20

    +% te initial model is not selected 6 s!"are #ill *ecome si&ni%icant.

    (6 : Model is omoscedastic(a : Model is eteroscedasticity

    0en te -'al"e :.: 9

    0e reect te 7: and accet 7a.

    Gold*eld7Qua!dt Te"t

    +n statistics te &old%ield !"andt test cecs te eteroscedasticity in re&ression analysis

    *y di'idin& a dataset into t#o &ro"s called t#o &ro" test #ic o%%ers dia&nostic o%

    eterosedastic errors in "ni'ariate or m"lti'ariate re&ression model.

    6e!"ired test statistic T< C6SS2@(n-)@2 cG @ C6SS1@(n-)@2 cG

    (6 : ;12 < ;22(a : ;12 H ;22

    0en te -'al"e :.:9 #eIll reect 7: and accet 7a.

    B8G Te"t:

    Te Bre"s a&an Test is "sed to test te eterosedascity in linear re&ression model and

    tests #eter te estimate 'ariance o% resid"als %rom a re&ression are deendent on

    'al"es indeendent 'aria*les.

    >

  • 7/24/2019 econometric Topic

    6/20

    d. Data Trans%ormation.

    Q. Ta;e a!y data o* you %$oi%e )it$i! t$e built7i! R data"et. Illu"tate all t$at you

    $a&e e3lai!ed i! #ue"tio! 0 )it$ t$i" data. E3lai! t$e R7e"ult" o* t$i" e3e%i"e.

    Submit R7%ode" "%it alo!+ )it$ e"ult".

    Ans:R-Script:p p library(lmtest)> bptest(p)

    stdenti!ed "resc#-$agan test

    data: p"$ = %&'*, d = , p-ale = .&.**

    > plot(p)

    /it to see ne0t plot:

    1nterpretation: /2- 3#e 4ata #as #omoscedacity/5- 3#e data #as no #omoscedacity (#eteroscedacity e0ists)

    Since p ale is greater t#an .&.% 6e re7ect nll #ypot#esis and accept alternate#ypot#esis i&e t#e data contains #eteroscedacity&

  • 7/24/2019 econometric Topic

    7/20

  • 7/24/2019 econometric Topic

    8/20

  • 7/24/2019 econometric Topic

    9/20

    Q4.Test weak-form eciency of the ecient markets hypothesis for anyIndian stock of your choice for the period 01-01-2014 to 30-10-2015usin! your know"ed!e of time series ana"ysis. #25 marks$5 %se the datainsurance.&"s attached with this mai" to 'ui"d a "inear re!ression mode"with the fo""owin! points in mind(

    R7Code:

    mydata - read.cs'(NL/@sers@a"ra'@Do#nloads@:::8O.cs'N)mydataPts-ts(mydataPLlose.rice9 %re!

  • 7/24/2019 econometric Topic

    10/20

    li*rary(!"antmod)&etSym*ols(NLila.SN9 src

  • 7/24/2019 econometric Topic

    11/20

    H &etSym*ols(NSE+N9 src

  • 7/24/2019 econometric Topic

    12/20

  • 7/24/2019 econometric Topic

    13/20

  • 7/24/2019 econometric Topic

    14/20

  • 7/24/2019 econometric Topic

    15/20

  • 7/24/2019 econometric Topic

    16/20

    Q5.%se the data insurance.&"s attached with this mai" to 'ui"d a "inearre!ression mode" with the fo""owin! points in mind(1. )ependent *aria'"e - +,har!es

    2. ,reate the fo""owin! aria'"es( / se& 1 if ma"e and 0 if fema"e#fema"e as 'ase cate!ory$

    / ,onert re!ion to dummies with northeast as the 'ase cate!ory/ smoke1 if yes and 0 if no

    / ,reate a new aria'"e 'mi30 such that 'mi30 1 if 'mi 30 0otherwise

    / ,reate an interaction aria'"e / #'mi30 & smoke$/ ,reate a!e2a!e & a!e

    3. Independent *aria'"es / a"" ori!ina" and user created aria'"es otherthan char!es4. &p"ain the 0 and 1 ino"ed in the -tests and t-tests and thecorrespondin! resu"ts #p-a"ues$5. 6onus points if you can 'ui"d some e&citin! !raphs and charts usin!any too" of your conenience. 6e sure to share the insi!hts from the

    !raphs.

    A!"./

    data< read.cs'(NL/@sers@Sayon@Desto@crist@Lrist ttrimester@Econometrics@ins"rance.cs'N)H attac(data)HH se1

  • 7/24/2019 econometric Topic

    17/20

    n

  • 7/24/2019 econometric Topic

    18/20

    D% S"m S! Mean S! F 'al"e r(HF)n"ll 1 1.VeK11 1.VeK11 23V8.VV 2e-15 YYYcildren 1 2.VV:eK:5 2.VV:eK:5 :.351 :.481se1 1 3.35OeK:5 3.35OeK:5 :.4:5 :.23Vsmoer1 1 1.125eK:5 1.125eK:5 :.135 :.O124

    *mi3: 1 2.8eK: 2.8eK: :.:31 :.85:re&ion1 3 1.V8OeK:O 5.522eK:5 :.OVV :.4V42

    *mi3:.smoer1 1 1.11eK:O 1.11eK:O 1.345 :.2451a&e2 1 3.2:3eK:O 3.2:3eK:O 3.85O :.:4V Y6esid"als 132O 1.:VVeK1: 8.28eK:5---Si&ni%. codes/ : ZYYYI :.::1 ZYYI :.:1 ZYI :.: Z.I :.1 Z I 1

    (yot$e"i" te"ti!+:1) 1.Te indeendent 'aria*le [n"ll\ as a si&ni%icant -'al"e #ic is less tan :.::1

    i.e 2e-15 YYY. 7ence #eIll reect 7:and accet 7a. So9 [n"ll\ as si&ni%icant imacton te deendent 'aria*le [car&es\.

    2) Te indeendent 'aria*le [cildren\ as an insi&ni%icant -'al"e o% &reater tan :.:

    i.e.:.481 . 7ence #eIll accet 7: and reect 7a. So9 [cildren\ as no si&ni%icant

    imact on te deendent 'aria*le [car&es\.

    3) Te indeendent 'aria*le [se\ as an insi&ni%icant -'al"e o% &reater tan :.:. i.e.

    :.23V 7ence #eIll accet 7: and reect 7a. So9 [se\ as no si&ni%icant imact on

    te deendent 'aria*le [car&es\.

    4) Te indeendent 'aria*le [smoer\ as an insi&ni%icant -'al"e o% &reater tan

    :.:.i.e :.O124 7ence #eIll accet 7: and reect 7a. So9 [smoer\ as no si&ni%icant

    imact on te deendent 'aria*le [car&es\.

    ) Te indeendent 'aria*le [*mi\ as an insi&ni%icant -'al"e o% &reater tan :.: i.e.

    :.85: . 7ence #eIll accet 7: and reect 7a. So9 [*mi\ as no si&ni%icant imact

    on te deendent 'aria*le [car&es\.

    5) Te indeendent 'aria*le [re&ion\ as an insi&ni%icant -'al"e o% &reater tan

    :.:.i.e. :.4V42 7ence #eIll accet 7: and reect 7a. So9 [re&ion\ as no

    si&ni%icant imact on te deendent 'aria*le [car&es\.

    O) Te +nteractin& 'aria*le *mi ? smoer as a si&ni%icant -'al"e o% &reater tan

    :.:.i.e.:.2451 7ence #eIll accet 7: and reect 7a. So9 Te +nteractin& 'aria*le

    *mi ? smoer as no si&ni%icant imact on te deendent 'aria*le [car&es\.

    8) Te indeendent 'aria*le [a&e\ as an insi&ni%icant -'al"e o% &reater tan :.:.i.e

    :.:4V Y 7ence #eIll reect 7: and accet 7a. So9 [a&e\ as si&ni%icant imact on

    te deendent 'aria*le [car&es\.

  • 7/24/2019 econometric Topic

    19/20

    lots/

  • 7/24/2019 econometric Topic

    20/20

    0 20000 40000 60000

    0

    20000

    5

    0000

    null

    charges

    20 30 40 50

    0

    20000

    5

    0000

    bmi

    0 20000 40000 60000

    -4000

    0

    4000

    charges

    e1

    0 20000 40000 60000

    -20000

    0

    20000

    charges

    0it lot no.1 #e can in%er tat te n"ll and *mi are te indeendent 'aria*les #ilete car&es deendent 'aria*le co"ld *e redicted #it te el o% te n"ll. T"s #itte cart #e can say tat te tey *ot are correlated ositi'ely.0it lot no.2 #e can in%er tat tere is no correlation *et#een te car&es and te

    *mi.

    BIBLIOGRA8(Y

    $tt:@@)))."tat"ma;eme%y.%om@"mm%t$eblo+@%o!*u"i!+7"tat"7tem"7e3lai!ed7

    $eteo"%eda"ti%ity7$eteo";e.$tml

    $tt:@@))).)aba"$.edu@e%o!ometi%"@E%o!ometi%"Boo;@%$a1.$tm

    $tt:@@))).i!&e"toedia.%om@tem"@$@$eteo";eda"ti%ity.a"

    $tt":@@)))."tati"ti%""olutio!".%om@$omo"%eda"ti%ity@

    http://www.statsmakemecry.com/smmctheblog/confusing-stats-terms-explained-heteroscedasticity-heteroske.htmlhttp://www.statsmakemecry.com/smmctheblog/confusing-stats-terms-explained-heteroscedasticity-heteroske.htmlhttp://www3.wabash.edu/econometrics/EconometricsBook/chap19.htmhttp://www.investopedia.com/terms/h/heteroskedasticity.asphttps://www.statisticssolutions.com/homoscedasticity/http://www.statsmakemecry.com/smmctheblog/confusing-stats-terms-explained-heteroscedasticity-heteroske.htmlhttp://www.statsmakemecry.com/smmctheblog/confusing-stats-terms-explained-heteroscedasticity-heteroske.htmlhttp://www3.wabash.edu/econometrics/EconometricsBook/chap19.htmhttp://www.investopedia.com/terms/h/heteroskedasticity.asphttps://www.statisticssolutions.com/homoscedasticity/