










































Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Prepare-se para as provas
Estude fácil! Tem muito documento disponível na Docsity
Prepare-se para as provas com trabalhos de outros alunos como você, aqui na Docsity
Os melhores documentos à venda: Trabalhos de alunos formados
Prepare-se com as videoaulas e exercícios resolvidos criados a partir da grade da sua Universidade
Responda perguntas de provas passadas e avalie sua preparação.
Ganhe pontos para baixar
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Comunidade
Peça ajuda à comunidade e tire suas dúvidas relacionadas ao estudo
Descubra as melhores universidades em seu país de acordo com os usuários da Docsity
Guias grátis
Baixe gratuitamente nossos guias de estudo, métodos para diminuir a ansiedade, dicas de TCC preparadas pelos professores da Docsity
manual para auxiliar a rodar as regressões do livro de econometria básica do gujarati
Tipologia: Manuais, Projetos, Pesquisas
1 / 50
Esta página não é visível na pré-visualização
Não perca as partes importantes!
Em oferta
Source | SS df MS Number of obs = 15 -------------+------------------------------ F( 1, 13) = 8144. Model | 3351406.23 1 3351406.23 Prob > F = 0. Residual | 5349.35306 13 411.488697 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 3356755.58 14 239768.256 Root MSE = 20.
y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x | .706408 .0078275 90.25 0.000 .6894978. _cons | - 184.0779 46.26183 - 3.98 0.002 - 284.0205 - 84.
reg y x Source | SS df MS Number of obs = 10 -------------+------------------------------ F( 1, 8) = 202. Model | 8552.72727 1 8552.72727 Prob > F = 0. Residual | 337 .272727 8 42.1590909 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 8890 9 987.777778 Root MSE = 6.
y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x | .5 090909 .0357428 14.24 0.000 .4266678. _cons | 24.45455 6.413817 3.81 0.005 9.664256 39.
. mat a = e(V) . mat list a symmetric a[2,2] x _cons x. _cons - .2171832 41.
Source | SS df MS Number of obs = 10 -------------+------------------------------ F( 1, 8) = 202. Model | 8552.72727 1 8552.72727 Prob > F = 0. Residual | 337.272727 8 42.1590909 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 8890 9 987.777778 Root MSE = 6.
y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x | .5090909 .0357428 14.24 0.000 .4266678. _cons | 24.45455 6.413817 3.81 0.005 9.664256 39.
test x=0. ( 1) x =. F( 1, 8) = 34. Prob > F = 0.
Source | SS df MS Number of obs = 10 -------------+------------------------------ F( 1, 8) = 202. Model | 8552.72727 1 8552.72727 Prob > F = 0. Residual | 337.272727 8 42.1590909 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 8890 9 987.777778 Root MSE = 6.
y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x | .5090909 .0357428 14.24 0.000 .4266678. _cons | 24.45455 6.413817 3.81 0.005 9.664256 39.
reg despalim desptot Source | SS df MS Number of obs = 55 -------------+------------------------------ F( 1, 53) = 31. Model | 139022.82 1 139022.82 Prob > F = 0. Residual | 236893.616 53 4469.69087 R-squared = 0. -------------+------------------------------ Adj R-squared = 0.
despalim | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- desptot | .4368088 .0783226 5.58 0.000 .2797135. _cons | 94.20878 50.85635 1.85 0.070 - 7.796134 196.
test desptot=0. ( 1) desptot =. F( 1, 53) = 0. Prob > F = 0.
predict residuos, r
jb6 residuos Jarque-Bera normality test: .2576 Chi(2). Jarque-Bera test for Ho: normality: (residuos)
sum Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- despalim | 55 373.3455 83.4351 196 610 desptot | 55 639.0364 116.1595 382 801 residuos | 55 1.76e-07 66.23382 -153.7664 171.
reg lndespalim lndesptot Source | SS df MS Number of obs = 55 -------------+------------------------------ F( 1, 53) = 37. Model | 1.16070799 1 1.16070799 Prob > F = 0. Residual | 1.65334333 53 .031195157 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 2.81405132 54 .052112062 Root MSE =.
lndespalim | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- lndesptot | .7363261 .1207125 6.10 0.000 .4942075. _cons | 1.154333 .777959 1.48 0.144 - .4060553 2.
gen inverpnb = 1/pnb
reg mi inverpnb Source | SS df MS Number of obs = 64 -------------+------------------------------ F( 1, 62) = 52. Model | 166946.595 1 166946.595 Prob > F = 0. Residual | 196731.405 62 3173.08717 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 363678 63 5772.66667 Root MSE = 56.
mi | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- inverpnb | 27273.16 3759.999 7.25 0.000 19757.03 34789. _cons | 81.79436 10.83206 7.55 0.000 60.14138 103.
tsset ano, yearly time variable: ano, 1960 to 1998 delta: 1 year
gen deltapi = pi-l1.pi (1 missing value generated)
reg deltapi un Source | SS df MS Number of obs = 38 -------------+------------------------------ F( 1, 36) = 16. Model | 39.0574389 1 39.0574389 Prob > F = 0. Residual | 84.9123 36 2.358675 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 123.969739 37 3.35053348 Root MSE = 1.
deltapi | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- un | - .6 895286 .1694472 - 4.07 0.000 - 1.033183 -. _cons | 4.178089 1.057162 3.95 0.000 2.034066 6.
gen inversoun = 1/un
reg deltapi inversoun Source | SS df MS Number of obs = 38 -------------+------------------------------ F( 1, 36) = 9. Model | 25.6226535 1 25.6226535 Prob > F = 0. Residual | 98.3470854 36 2.73186348 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 123.969739 37 3.35053348 Root MSE = 1.
reg u1 u2, noconst Source | SS df MS Number of obs = 64 -------------+------------------------------ F( 1, 63) = 8. Model | 13847.3245 1 13847.3245 Prob > F = 0. Residual | 106315.625 63 1687.54961 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 120162.95 64 1877.54609 Root MSE = 41.
u1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- u2 | - .0056466 .0019712 - 2.86 0.006 - .0095857 -.
reg mi pnb taf Source | SS df MS Number of obs = 64 -------------+------------------------------ F( 2, 61) = 73. Model | 257362.373 2 128681.187 Prob > F = 0. Residual | 106315.627 61 1742.87913 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 363678 63 5772.66667 Root MSE = 41.
mi | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- pnb | - .0056466 .0020033 - 2.82 0.006 - .0096524 -. taf | - 2.231586 .2099472 - 10.63 0.000 - 2.651401 - 1. _cons | 263.6416 11.59318 22.74 0.000 240.4596 286.
Source | SS df MS Number of obs = 11 -------------+------------------------------ F( 1, 9) = 17. Model | .29297476 1 .29297476 Prob > F = 0. Residual | .1490797 9 .016564411 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | .44205446 10 .044205446 Root MSE =.
y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x | - .479529 .1140218 - 4.21 0.002 - .7374642 -. _cons | 2.691124 .1216225 22.13 0.000 2.415995 2.
. gen lny = ln(y) . gen lnx = ln(x) . reg lny lnx Source | SS df MS Number of obs = 11 -------------+------------------------------ F( 1, 9) = 26. Model | .066054476 1 .066054476 Prob > F = 0. Residual | .02263302 9 .00251478 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | .088687496 10 .00886875 Root MSE =.
lny | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+---------------------------------------------------------------- lnx | - .2 530461 .049374 - 5.13 0.001 - .3647379 -. _cons | .7774176 .0152421 51.00 0.000 .7429375.
gen lny = ln(y)
. gen lnx2 = ln(x2) . gen lnx3 = ln(x3) . reg lny lnx2 lnx Source | SS df MS Number of obs = 15 -------------+------------------------------ F( 2, 12) = 48. Model | .538038027 2 .269019013 Prob > F = 0. Residual | .067158351 12 .005596529 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | .605196377 14 .043228313 Root MSE =.
lny | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+---------------------------------------------------------------- lnx2 | 1.498767 .5398018 2.78 0.017 .3226405 2. lnx3 | .4898585 .1020435 4.80 0.000 .2675249. _cons | - 3. 338459 2.449504 - 1.36 0.198 - 8.675471 1.
2
3
. gen x2 = x^ . gen x3 = x^
reg mi pnb taf Source | SS df MS Number of obs = 64 -------------+------------------------------ F( 2, 61) = 73. Model | 257362.373 2 128681.187 Prob > F = 0. Residual | 106 315.627 61 1742.87913 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 363678 63 5772.66667 Root MSE = 41.
mi | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- pnb | -.0056466 .0020033 -2.82 0.006 -.0096524 -. taf | -2.231586 .2099472 -10.63 0.000 -2.651401 -1. _cons | 263.6416 11.59318 22.74 0.000 240.4596 286.
. gen x2=x^ . gen x3=x^ . reg y x x2 x Source | SS df MS Number of obs = 10 -------------+------------------------------ F( 3, 6) = 1202. Model | 38918.1562 3 12972.7187 Prob > F = 0. Residual | 64.7438228 6 10.7906371 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 38982.9 9 4331.43333 Root MSE = 3.
y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+---------------------------------------------------------------- x | 63.47766 4.778607 13.28 0.000 51.78483 75. x2 | - 12.96154 .9856646 - 13.15 0.000 - 15.37337 - 10. x3 | .9395882 .0591056 15.90 0.000 .794962 1. _cons | 141.7667 6.375322 22.24 0.000 126.1668 157.
mat a = e(V) mat list a symmetric a[4,4] x x2 x3 _cons x 22. x2 -4.6113834. x3 .26585324 - .05764229. _cons -28.475292 5.3953186 -.29973992 40.
test x2=x ( 1) x2 - x3 = 0 F( 1, 6) = 177. Prob > F = 0.
. gen lny=ln(y) . gen lnx2=ln(x2) . gen lnx3=ln(x3) . gen lnx4=ln(x4) . gen lnx5=ln(x5) . reg lny lnx2 lnx3 lnx4 lnx Source | SS df MS Number of obs = 23 -------------+------------------------------ F( 4, 18) = 249. Model | .761050242 4 .190262561 Prob > F = 0. Residual | .013702848 18 .000761269 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | .77475309 22 .03521605 Root MSE =.
lny | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+---------------------------------------------------------------- lnx2 | .3425546 .0832663 4.11 0.001 .1676186. lnx3 | -.5045934 .1108943 -4.55 0.000 -.7375737 -. lnx4 | .1485461 .0996726 1.49 0.153 -.0608583. lnx5 | .0911056 .1007164 0.90 0.378 -.1204917. _cons | 2.189793 .1557149 14.06 0.000 1.862648 2.
test lnx4=lnx5= ( 1) lnx4 - lnx5 = 0 ( 2) lnx4 = 0 F( 2, 18) = 1. Prob > F = 0.
II. Estimação do modelo log-log e obtenção dos valores estimados de LnY (lnf). gen lny=ln(y) gen lnx2=ln(x2) gen lnx3=ln(x3) reg lny lnx2 lnx Source | SS df MS Number of obs = 16 -------------+------------------------------ F( 2, 13) = 17. Model | 1.0300302 2 .515015098 Prob > F = 0. Residual | .382568648 13 .029428358 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 1.41259884 15 .094173256 Root MSE =.
lny | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnx2 | -1.760718 .298206 -5.90 0.000 -2.404953 -1. lnx3 | 1.33978 .5273242 2.54 0.025 .2005655 2. _cons | 9.227759 .5683903 16.23 0.000 7.999826 10.
Para obter o lny estimado o procedimento é o mesmo que no passo anterior, a diferença vai ser apenas o nome que vamos dar para a variável. No Stata: predict lnf, xb observe novamente que foi criada uma nova coluna na planilha do Stata para os lny estimados. III. Calculo de Z1 = (Lnyf - lnf). Para calcularmos z1, temos primeiro que tira o logaritmo da variável yf. No Stata: gen lnyf = ln(yf) Agora podemos calcular z1: gen z1= lnyf-lnf
IV. Regredimos o modelo linear acrescentando a variável Z1. Rejeita-se H0 se o coeficiente de Z1 for estatisticamente significativo segundo o teste t habitual. Como neste caso t não é significativo não rejeitamos o modelo linear como sendo o melhor.
. reg y x2 x3 z Source | SS df MS Number of obs = 16 -------------+------------------------------ F( 3, 12) = 13. Model | 48240240.9 3 16080080.3 Prob > F = 0. Residual | 14356115.1 12 1196342.92 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 62596356 15 4173090.4 Root MSE = 1093.
y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+---------------------------------------------------------------- x2 | -3783.062 597.286 -6.33 0.000 -5084.437 -2481. x3 | 2817.715 993.3304 2.84 0.015 653.4343 4981. z1 | 85.27798 4116.827 0.02 0.984 - 8884.518 9055. _cons | 9727.57 3023.018 3.22 0.007 3140.978 16314.
V. Calculo de Z2 = (antilog de lnf - yf). Antes de gera Z2 temos que calcular o antilogaritmo de lnf. O comando no Stata é: gen antilnf=exp(lnf) onde **antilnf** é o nome da variável que vamos criar, pode ser qualquer outro. E o lado direito é operação que queremos realizado, ou seja, o antilogaritmo da variável lnf. Agora podemos calcular Z2: gen z2= antilnf - yf VI. Regressão log-log acrescentando a variável Z2. Rejeita-se H1 se o
coeficiente Z2 for estatisticamente significativo segundo o teste t. Como Z2 não é significativo a nível de 10%, não rejeitamos o modelo log-log como sendo o melhor. Porém se consideramos o nível de 12% podemos rejeitar a hipótese H1, ou seja, rejeitamos o modelo log-log é melhor. reg lny lnx2 lnx3 z
gen dx=d*x
reg y d x dx Source | SS df MS Number of obs = 26 -------------+------------------------------ F( 3, 22) = 54. Model | 88079.8327 3 29359.9442 Prob > F = 0. Residual | 11790.2539 22 535.920634 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 99870.0867 25 3994.80347 Root MSE = 23.
y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- d | 152.4786 33.08237 4.61 0.000 83.86992 221. x | .0803319 .0144968 5.54 0.000 .0502673. dx | -.0654694 .0159824 -4.10 0.000 -.098615 -. _cons | 1.016115 20.16483 0.05 0.960 -40.80319 42.
reg y d1 d2 d3 d4, noconst Source | SS df MS Number of obs = 32 -------------+------------------------------ F( 4, 28) = 518. Model | 59654886.6 4 14913721.7 Prob > F = 0. Residual | 806142.375 28 28790.7991 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 60461029 32 1889407.16 Root MSE = 169.
y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- d1 | 1222.125 59.99041 20.37 0.000 1099.24 1345. d2 | 1467.5 59.99041 24.46 0.000 1344.615 1590. d3 | 1569.75 59.99041 26.17 0 .000 1446.865 1692. d4 | 1160 59.99041 19.34 0.000 1037.115 1282.
reg y d2 d3 d Source | SS df MS Number of obs = 32 -------------+------------------------------ F( 3, 28) = 10. Model | 915635.844 3 305211.948 Prob > F = 0. Residual | 806142.375 28 28790.7991 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 1721778.22 31 55541.2329 Root MSE = 169.
y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- d2 | 245.375 84.83926 2.89 0.007 71.58966 419. d3 | 347.625 84.83926 4.10 0.000 173.8397 521. d4 | - 62.125 84.83926 - 0.73 0.470 - 235.9103 111. _cons | 1222.125 59.99041 20.37 0.000 1099.24 1345.
gen x2=x- 5500
gen x2d=x2*d
reg y x x2d Source | SS df MS Number of obs = 10 -------------+------------------------------ F( 2, 7) = 129. Model | 8832644.9 2 4416322.45 Prob > F = 0. Residual | 238521.502 7 34074.5002 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 9071166.4 9 1007907.38 Root MSE = 184.
y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x | .2791258 .0460081 6.07 0.001 .1703338. x2d | .0945 .0825524 1.14 0.290 - .1007054. _cons | - 145.7167 176.734 1 - 0.82 0.437 - 563.6265 272.
MULTICOLINEARIDADE.