Exam
Exam
Exam
Notes:
1. Unicode is supported; see help unicode_advice.
2. More than 2 billion observations are allowed; see help obs_advice.
3. Maximum number of variables is set to 5,000; see help set_maxvar.
4. New update available; type -update all-
1 . use "C:\Users\Issay\Desktop\exam.dta"
2 . do "C:\Users\Issay\Desktop\stata_panel\do.projet.do"
5 . local SCR1=0
6 . scalar N=3
7 . scalar T=20
8 . scalar k=1
9 . forvalues i == 1/3 {
2. reg y x if country == `i'
3. local SCR1=`SCR1'+e(rss)
4. }
11 .
end of do-file
12 . regress y x
14 . xtreg y x,fe
F(1,56) = 21.39
corr(u_i, Xb) = 0.2906 Prob > F = 0.0000
sigma_u 1.118042
sigma_e 1.4433607
rho .37500825 (fraction of variance due to u_i)
F test that all u_i=0: F(2, 56) = 10.99 Prob > F = 0.0001
dec25 Thursday February 22 11:28:22 2024 Page 3
15 . xtreg y x i.country
country
can -.0707716 .4599927 -0.15 0.878 -.9723408 .8307976
usa -1.970921 .4798008 -4.11 0.000 -2.911314 -1.030529
sigma_u 0
sigma_e 1.4433607
rho 0 (fraction of variance due to u_i)
16 . tabulate country,gen(dum)
RU 20 33.33 33.33
can 20 33.33 66.67
usa 20 33.33 100.00
Total 60 100.00
18 . regress x y,re
option re not allowed
r(198);
dec25 Thursday February 22 11:28:23 2024 Page 4
19 . xtreg x y,re
sigma_u 0
sigma_e 18.479555
rho 0 (fraction of variance due to u_i)
20 . xtreg y x,fe
F(1,56) = 21.39
corr(u_i, Xb) = 0.2906 Prob > F = 0.0000
sigma_u 1.118042
sigma_e 1.4433607
rho .37500825 (fraction of variance due to u_i)
F test that all u_i=0: F(2, 56) = 10.99 Prob > F = 0.0001
21 . est store fe
22 . xtreg x y,re
sigma_u 0
sigma_e 18.479555
rho 0 (fraction of variance due to u_i)
23 . est store re
24 . hausman fe re,sigmamore
no coefficients in common; specify equations(matchlist)
for problems with different equation names.
r(498);
26 . xtreg y x,fe
F(1,56) = 21.39
corr(u_i, Xb) = 0.2906 Prob > F = 0.0000
sigma_u 1.118042
sigma_e 1.4433607
rho .37500825 (fraction of variance due to u_i)
F test that all u_i=0: F(2, 56) = 10.99 Prob > F = 0.0001
27 . est store fe
28 . xtreg x y,re
sigma_u 0
sigma_e 18.479555
rho 0 (fraction of variance due to u_i)
dec25 Thursday February 22 11:28:24 2024 Page 6
29 . est store re
30 . hausman fe re,sigmamore
no coefficients in common; specify equations(matchlist)
for problems with different equation names.
r(498);
31 . hausman fe re
no coefficients in common; specify equations(matchlist)
for problems with different equation names.
r(498);
34 .