wfcreate a 1953 1998 read(a2,s=oboeuf) H:\Master1_sem1\TD2\chapitre8.xls 4 'Problème n°1 : construction des variables et analyse descriptive '_____________________________________________________ 'Question 1 '--------------- scalar p90=p(@dtoo("1990")) scalar w90=w(@dtoo("1990")) genr p=p/p90*100 genr w=w/w90*100 'Question 2 '--------------- plot q p plot p w 'Problème n°2 : estimation de l'équation d'offre dans le cadre d'un modèle à la nerlove '_____________________________________________________________ 'Question 2 '---------------- equation eq1.ls q c p(-1) q(-1) w(-1) genr res=resid scalar denom=1-(eq1.@regobs*eq1.@coefcov(3,3)) scalar h if denom=0 then h=0 else h=(1-eq1.@dw/2)*(eq1.@regobs/denom)^0.5 endif scalar hpval=1-@cnorm(h) 'Question 3 '--------------- '1ère méthode genr q1=q(-1) equation eq2.ls q1 c p(-1) w(-1) w(-2) genr res2=resid equation eq3.ls q c p(-1) q(-1) w(-1) res2 '2ème méthode : statistqiue de Wald equation eq4.tsls q c p(-1) q(-1) w(-1) @ c p(-1) w(-1) w(-2) vector betamco=eq1.@coefs vector betavi=eq4.@coefs matrix covmco=eq1.@coefcov matrix covvi=eq4.@coefcov vector ecartbeta=betavi-betamco matrix ecartcov=covvi-covmco vector wald=@transpose(ecartbeta)*@inverse(ecartcov)*ecartbeta scalar waldpval=1-@cchisq(wald(1),1) 'Problème n°3 : Calcul des élasticités de court terme et de long terme ; utilisation des variables muettes '_____________________________________________________________ 'Question 1 '---------------- scalar q90=q(@dtoo("1990")) scalar ectb=eq1.@coef(2)*100/q90 scalar eltb=eq1.@coef(2)/(1-eq1.@coef(3))*100/q90 scalar ecta=eq1.@coef(4)*100/q90 scalar elta=eq1.@coef(4)/(1-eq1.@coef(3))*100/q90 'Question 2 '--------------- scalar ca=1-eq1.@coef(3) 'Question 3 '--------------- series D74 = an=1974 series D96 = an=1996 series D93 = an>=1993 series D93P = D93*p(-1) equation eq5.ls q c p(-1) q(-1) w(-1) D74 equation eq6.ls q c p(-1) q(-1) w(-1) D96 equation eq7.ls q c p(-1) q(-1) w(-1) D93 equation eq8.ls q c p(-1) q(-1) w(-1) D93P 'Problème n°4 : extension '_____________________ equation eq9.ls q c p(-1 to -3) q(-1) w(-1) d74