Produsul intern brut este principalul agregat macroeconomic si reprezinta valoarea de piata a bunurilor si serviciilor finale produse de catre toti agentii economici ce isi desfasoara activitatea pe teritoriul unei tari in 151o1414b tr-o perioada de timp bine determinata.
Y = PIB
X1 = total populatie
X2 = populatie ocupata
X3 = total someri
Y |
X0 |
X1 |
X2 |
X3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Estimarea parametrilor cu metoda celor mai mici patrate
Formula folosita este: a^ = ((X' * X )*X' * Y
- cu ajutorul functiei TRANSPOSE se calculeaza matricea transpusei
- folosind functia MMULT calculam X' * X
|
|
|
|
|
7.59708E+15 |
3.65625E+15 |
2.43958E+14 |
|
3.65625E+15 |
1.76622E+15 |
1.16882E+14 |
|
2.43958E+14 |
1.16882E+14 |
7.91136E+12 |
- cu functia MINVERSE aducem matricea de mai sus la puterea (-1)
|
|
|
|
|
7.59708E+15 |
3.65625E+15 |
2.43958E+14 |
|
3.65625E+15 |
1.76622E+15 |
1.16882E+14 |
|
2.43958E+14 |
1.16882E+14 |
7.91136E+12 |
- tot cu MMULT calculam ((X'*X)^-1)*X'
- tot cu aceasta functie calculam si a^
1.40353E+17 |
3.15994E+24 |
1.52185E+24 |
1.01387E+23 |
Din acestea rezulta ca :
a0^ = 1.4035
a1^ = 3.1599
a2^ = 1.5218
a3^ = 1.0138
Modelul obtinut este:
Y=1.4035 + 3.1599 * X1 + 1.5218 * X2 + 1.0138*X3
SUMMARY OUTPUT |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Regression Statistics |
|
|
|
|
|
|
|
|
Multiple R |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Adjusted |
|
|
|
|
|
|
|
|
Standard Error |
|
|
|
|
|
|
|
|
Observations |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ANOVA |
|
|
|
|
|
|
|
|
|
df |
SS |
MS |
F |
Significance F |
|
|
|
Regression |
|
8.229E+12 |
2.7429E+12 |
|
2.85E-06 |
|
|
|
Residual |
|
7.33E+11 |
6.6637E+10 |
|
|
|
|
|
Total |
|
8.962E+12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Coefficients |
Standard Error |
t Stat |
P-value |
Lower 95% |
Upper 95% |
Lower 95.0% |
Upper 95.0% |
Intercept |
|
|
|
|
|
|
|
|
X Variable 1 |
|
|
|
|
|
|
|
|
X Variable 2 |
|
|
|
|
|
|
|
|
X Variable 3 |
|
|
|
|
|
|
|
|
Din aceasta analiza rezulta ca doar variabilele X2 si X3 raman in model, pentru ca in intervalul de incredere al celeilalte se afla O.
Testul Student
Acest test porneste de la 2 ipoteze:
H0: ai=0 => variabilele nu sunt incluse in model
H1: ai<>0 => variabilele sunt incluse in model
Daca t calculat < t teoretic => se accepta ipoteza H0, adica variabilele nu sunt incluse in model, iar daca t calculate > t teoretic => se accepta ipoteza H1, adica variabilele sunt incluse in model.
df = numarul de inregistrari - numarul de variabile - 1
probabilitatea = 0.05
-calculate cu ajutorul functiei TINV
Y
X2
X3
y estimat
y-y mediu
(y-y mediu) ^2
y-y estimat
(y-y estimat)^2
1.2E+07
3.88E+11
5.382E+09
1.2E+07
3.86E+11
5.309E+09
1.2E+07
3.82E+11
1.2E+07
3.64E+11
1.1E+07
3.29E+11
2.562E+09
1.1E+07
3.04E+11
1.014E+09
1.1E+07
2.65E+11
2.257E+10
1.1E+07
1.37E+11
3.028E+10
1.1E+07
6.38E+10
5.028E+10
1.1E+07
6.08E+09
7.443E+09
1.1E+07
3.24E+10
3.026E+10
1.1E+07
2.96E+11
2.028E+11
7.94E+11
1.953E+11
1.83E+12
2.829E+09
3.39E+12
1.779E+11
8.96E+12
7.35E+11
SCT
8.227E+12
SCR
SCE
Y mediu =
SCT = 8.96E+12
SCR = 7.35E+11
SCE = 8.227E+12
- Calculam F = (SCE/k)/(SCR/(n-k-1)) = 15.74502325
F calc = (SCE/k)/(SCR/(n-k-1)) = 67.15689543
- Comparam F calculate cu F teoretic, cu ajutorul functiei FINV
F teoretic =
Calculam coeficientul de determinatie: R^2 = SCE/SCT =
F calculat > F teoretic => se accepta H1, adica variabilele explicative introduse in model explica in cea mai mare masura evolutia lui y.
Testul Chow
Acesta este un test care verifica daca modelul este stabil pe intreaga perioada sau nu. El se aplica si in cazul in care se testeaza daca adaugarea de noi observari imbunatateste semnificativ calitatea ajustarii.
- Se estimeaza modelul cu toate variabilele explicative pe intreaga perioada, determinandu-se SCE, SCR si SCT
SCT = 8.96E+12
SCR = 7.35E+11
SCE = 8.227E+12
- Se estimeaza modelul pe subperioade, determinandu-se SCT1, SCT2, SCR1, SCR2, SCE1 si SCE2
SCR1 = 6.8E+10
SCR2 = 6.7E+11
SCT1 = 2.6E+12
SCT2 = 6.4E+12
SCE1 = 2.5E+12
SCE2 = 5.7E+12
Pentru ca SCR = SCR1 + SCR2 se accepta Ho, adica modelul este stabil pe intreaga perioada.
- Se calculeaza F. Aceasta valoare se va compara cu F-ul teoretic, valoare calculata cu ajutorul finctiei FINV.
F teoretic =
F = /[(SCR1+SCR2)/(n-2k-2)] = -6E-18
Deoarece F calculate < F teoretic, se accepta ipoteza H0, deci modelul este stabil pe intreaga perioada.
Multicoliniaritate
Atunci cand se construieste modelul se va urmari ca variabilele explicate introduse sa prezinte un coeficient de corelatie cu variabila de explicat cat mai mare si in acelasi timp sa fie cat mai putin corelate intre ele. Existenta coliniaritatii intre variabilele explicative are ca efecte:
ryx2
ryx3
- Introducem in model varabila cea mai puternic corelata (in acest caz variabila x3)
Y=f(x3)
SUMMARY OUTPUT |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Regression Statistics |
|
|
|
|
|
|
|
|
Multiple R |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Adjusted |
|
|
|
|
|
|
|
|
Standard Error |
|
|
|
|
|
|
|
|
Observations |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ANOVA |
|
|
|
|
|
|
|
|
|
df |
SS |
MS |
F |
Significance F |
|
|
|
Regression |
|
3.487E+12 |
3.487E+12 |
|
|
|
|
|
Residual |
|
5.475E+12 |
4.2114E+11 |
|
|
|
|
|
Total |
|
8.962E+12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Coefficients |
Standard Error |
t Stat |
P-value |
Lower 95% |
Upper 95% |
Lower 95.0% |
Upper 95.0% |
Intercept |
-5E+06 |
|
|
|
|
|
|
|
X Variable 1 |
|
|
|
|
|
|
|
|
Rezulta ca variabila x2 ramane in model deoarece intervalul in care se alfa nu il contine pe zero.
- Se introduce langa variabila X2 si cealalta variabila ramasa,adica X3 si se face regresia pentru ambele:
Y=f(x2,x3)
SUMMARY OUTPUT |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Regression Statistics |
|
|
|
|
|
|
|
|
Multiple R |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Adjusted |
|
|
|
|
|
|
|
|
Standard Error |
|
|
|
|
|
|
|
|
Observations |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ANOVA |
|
|
|
|
|
|
|
|
|
df |
SS |
MS |
F |
Significance F |
|
|
|
Regression |
|
8.227E+12 |
4.1134E+12 |
|
3.04E-07 |
|
|
|
Residual |
|
7.35E+11 |
6.125E+10 |
|
|
|
|
|
Total |
|
8.962E+12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Coefficients |
Standard Error |
t Stat |
P-value |
Lower 95% |
Upper 95% |
Lower 95.0% |
Upper 95.0% |
Intercept |
1E+07 |
|
|
|
|
|
|
|
X Variable 1 |
|
|
|
1.404E-06 |
|
|
|
|
X Variable 2 |
|
|
|
|
|
|
|
|
De aici rezulta ca vom merge in continuare fara s ail excludem pe x3
Variabila Dummy
Pentru o analiza mai buna a modelului se pune intrebarea
daca pe parcursul acestei perioade (1990-2004) cresterea numarului de someri
din
Y |
X2 |
X3 |
Dt |
|
1.2E+07 |
|
|
|
1.2E+07 |
|
|
|
1.2E+07 |
|
|
|
1.2E+07 |
|
|
|
1.1E+07 |
|
|
|
1.1E+07 |
|
|
|
1.1E+07 |
|
|
|
1.1E+07 |
|
|
|
1.1E+07 |
|
|
|
1.1E+07 |
|
|
|
1.1E+07 |
|
|
|
1.1E+07 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dt = 1: fenomenul a avut loc
Dt = 0: fenomenul nu a avut loc
SUMMARY OUTPUT |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Regression Statistics |
|
|
|
|
|
|
|
|
Multiple R |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Adjusted |
|
|
|
|
|
|
|
|
Standard Error |
|
|
|
|
|
|
|
|
Observations |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ANOVA |
|
|
|
|
|
|
|
|
|
df |
SS |
MS |
F |
Significance F |
|
|
|
Regression |
|
8.227E+12 |
2.7423E+12 |
|
2.89E-06 |
|
|
|
Residual |
|
7.35E+11 |
6.6818E+10 |
|
|
|
|
|
Total |
|
8.962E+12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Coefficients |
Standard Error |
t Stat |
P-value |
Lower 95% |
Upper 95% |
Lower 95.0% |
Upper 95.0% |
Intercept |
1E+07 |
|
|
|
|
|
|
|
X Variable 1 |
|
|
|
7.329E-06 |
|
|
|
|
X Variable 2 |
|
|
|
|
|
|
|
|
X Variable 3 |
|
|
|
|
|
|
|
|
Y=10373542-0.87390079*X1-0.41028115*X2-916.973517*Dt (Estimarea modelului)
Aplicam testul student pentru a afla valoarea teoretica : 2.200986273
F calculate = -0.0062973
< => H0, adica variabila (numarul de someri) nu are o influenta semnificativa asupra PIB-ului total
Autocorelarea erorilor
Testul Darwin-Watson
Y |
X2 |
X3 |
y estimat |
et=y-y est |
et^2 |
et-et-e |
(et-et-1)^2 |
|
1.2E+07 |
|
|
|
5.38E+09 |
5.382E+09 |
2.897E+19 |
|
1.2E+07 |
|
|
|
5.31E+09 |
|
5.392E+15 |
|
1.2E+07 |
|
|
|
9.27E+08 |
-4.38E+09 |
1.92E+19 |
|
1.2E+07 |
|
|
|
1.08E+08 |
-8.19E+08 |
6.711E+17 |
|
1.1E+07 |
|
|
|
2.56E+09 |
2.453E+09 |
6.019E+18 |
|
1.1E+07 |
|
|
|
1.01E+09 |
-1.55E+09 |
2.395E+18 |
|
1.1E+07 |
|
|
|
2.26E+10 |
2.156E+10 |
4.646E+20 |
|
1.1E+07 |
|
|
|
3.03E+10 |
7.711E+09 |
5.946E+19 |
|
1.1E+07 |
|
|
|
5.03E+10 |
2E+10 |
3.998E+20 |
|
1.1E+07 |
|
|
|
7.44E+09 |
-4.28E+10 |
1.835E+21 |
|
1.1E+07 |
|
|
|
3.03E+10 |
2.281E+10 |
5.205E+20 |
|
1.1E+07 |
|
|
|
2.03E+11 |
1.725E+11 |
2.977E+22 |
|
|
|
|
|
1.95E+11 |
-7.45E+09 |
5.556E+19 |
|
|
|
|
|
2.83E+09 |
-1.93E+11 |
3.706E+22 |
|
|
|
|
|
1.78E+11 |
1.751E+11 |
3.066E+22 |
DW=∑(et-et-1)²/∑et²
DW = 1.4
d1 = 0,946
d2 = 1,543
Avem urmatoarele intervale:
(0; d1) = (0; 0.946) => corelatie pozitiva
(d1; d2) = (0.946; 1.543) => zona de nedeterminare
(d2; 2) = (1.543; 2) => nu exista corelatie
(2; 4-d2) = (2; 2.457) => nu exista corelatie
(4-d2; 4-d1) = (2.457; 3.054) => zona de nedeterminare
(4-d1; 4) = (3.0.54; 4)-corelatie negativa
DW Є (0.946;1.543 ) => ne aflam in zona de nedeterminare
Previziunea cu ajutorul regresiei multiple
Y |
X0 |
X2 |
X3 |
Dt |
y estimat |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Se calculeaza transpusa matricei X
- Se calculeaza X`*X:
1.47967E+13 |
|
9.157E+13 |
7.2119E+12 |
|
|
|
|
9.15698E+13 |
1.6E+08 |
1.766E+15 |
1.1688E+14 |
7.21192E+12 |
1.1E+07 |
1.169E+14 |
7.9114E+12 |
- Se calculeaza (X`*X)^-1:
1.36053E-12 |
-1E-05 |
1.189E-12 |
5.5582E-13 |
-1.41078E-05 |
|
-1.52E-05 |
-4.577E-05 |
1.18864E-12 |
-2E-05 |
1.2E-12 |
2.0159E-12 |
5.5582E-13 |
-5E-05 |
2.016E-12 |
3.2639E-11 |
- Se calculeaza Xn+1:
- Se calculeaza (Xn+1)`*(X`*X)^-1
- Se calculeaza ((Xn+1)`*(X`*X))^-1*(Xn+1)
- Se aduna aceasta valoare cu 1
- Se inmulteste cu varianta erorilor
- Se extrage radicalul
- Radicalul se inmulteste cu T student
- Rezulta ca Yn+1 Є [a;b]
|