Augusto C. de MoraesProf. Luis Moreno Modelos que contêm uma mistura de EFEITOS FIXOS e EFEITOS...
-
Upload
matheus-henrique-cavalheiro-azevedo -
Category
Documents
-
view
220 -
download
0
Transcript of Augusto C. de MoraesProf. Luis Moreno Modelos que contêm uma mistura de EFEITOS FIXOS e EFEITOS...
Prof. José Leopoldo Ferreira Antunes
Curso de VerãoAnálise Multinível em
Estudos Epidemiológicos
5
Augusto C. de Moraes Prof. Luis Moreno
Tabela 1:descrição
Tabe
la 2
: men
inas
Tabe
la 3
: men
inos
Modelos que contêm uma mistura de EFEITOS FIXOS e EFEITOS RANDÔMICOS. Nesses modelos, alguns dos coeficientes podem variar randomicamente entre contextos, enquanto outros não podem. Modelos mistos constituem um caso particular da análise multinível em geral, embora o termo seja ocasionalmente empregado como sinônimo de modelos multinível.
Diez-Roux AV. A glossary for multilevel analysis. J Epidemiol Community Health 2002; 56:588-94.
Ana Diez-Roux
Title
[XT] xtmixed -- Multilevel mixed-effects linear regression
Description
xtmixed fits linear mixed models. Mixed models are characterized as containing both fixed effects and random effects. The fixed effects are analogous to standard regression coefficients and are estimated directly. The random effects are not directly estimated, but summarized according to their estimated variances and covariances. Random effects may take the form of either random intercepts or random coefficients, and the grouping structure of the data may consist of multiple levels of nested groups. The error distribution of the linear mixed model is assumed to be Gaussian.
Help do Stata
xtmixed desf fatind || cidade:xtmixed desf fatind || cidade: fatind, cov(un)
xtmelogit desfcat fatindcat || cidade:, orxtmelogit desfcat fatindcat || cidade: fatindcat, or cov(un)
xtmepoisson desfcat fatindcat || cidade:, irrxtmepoisson desfcat fatindcat || cidade: fatindcat, irr cov(un)
Com
ando
s do
Sta
ta
Mixed models
yi = b0 + b1*xi + ei
Como se faz no Stata?sort cidadeby cidade: reg desf fatind
b01 b11
b02 b12
b03 b13
... ...b0j b1j
... ...b0m b1m
Resultam dois vetores de coefs. de regressão!
. xtmixed desf fatind || cidade: fatind, cov(un)
------------------------------------------------------------------------------ desf | Coef. Std. Err. z P>|z| [95% Conf. Interval]-------------+---------------------------------------------------------------- fatind | .7901859 .0278985 28.32 0.000 .7355057 .844866 _cons | 223.4614 24.66826 9.06 0.000 175.1125 271.8103------------------------------------------------------------------------------
------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]-----------------------------+------------------------------------------------cidade: Independent | sd(fatind) | .0496378 .0461642 .00802 .307219 sd(_cons) | 98.22576 18.78648 67.51902 142.8975-----------------------------+------------------------------------------------ sd(Residual) | 200.5175 4.811012 191.3063 210.1721------------------------------------------------------------------------------LR test vs. linear regression: chi2(2) = 124.80 Prob > chi2 = 0.0000
Note: LR test is conservative and provided only for reference
------------------------------------------------------------- Parte fixa| Coeficiente Erro-Padrão------------------+------------------------------------------ B1 | .7901859 .0496378 B0 | 223.4614 98.22576-------------------------------------------------------------------------
------------------------------------------------------------------------- Parte móvel | [95% Conf. Interval]-----------------------+------------------------------------------------ B1 |(+1.96*EP) = 0.692896 a 0.887476 B0 |(+1.96*EP) = 30.93891 a 415.9389-----------------------+-------------------------------------------------
. xtreg desf fatind, i(cidade) re
Random-effects GLS regression Number of obs = 900Group variable (i): cidade Number of groups = 20
R-sq: within = 0.5292 Obs per group: min = 45 between = 0.0213 avg = 45.0 overall = 0.4328 max = 45
Random effects u_i ~ Gaussian Wald chi2(1) = 863.61corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000------------------------------------------------------------------------------ desf | Coef. Std. Err. z P>|z| [95% Conf. Interval]-------------+---------------------------------------------------------------- fatind | .7416817 .0252383 29.39 0.000 .6922156 .7911478 _cons | 238.7738 14.71372 16.23 0.000 209.9354 267.6122-------------+---------------------------------------------------------------- sigma_u | 40.28248 sigma_e | 200.81754 rho | .03868091 (fraction of variance due to u_i)------------------------------------------------------------------------------
. xtreg desf fatind, i(cidade) fe
Fixed-effects (within) regression Number of obs = 900Group variable (i): cidade Number of groups = 20
R-sq: within = 0.5292 Obs per group: min = 45 between = 0.0213 avg = 45.0 overall = 0.4328 max = 45 F(1,879) = 988.05corr(u_i, Xb) = -0.3839 Prob > F = 0.0000------------------------------------------------------------------------------ desf | Coef. Std. Err. t P>|t| [95% Conf. Interval]-------------+---------------------------------------------------------------- fatind | .7973167 .0253654 31.43 0.000 .7475329 .8471005 _cons | 218.849 11.28413 19.39 0.000 196.702 240.996-------------+---------------------------------------------------------------- sigma_u | 107.59617 sigma_e | 200.81754 rho | .22304247 (fraction of variance due to u_i)------------------------------------------------------------------------------F test that all u_i=0: F(19, 879) = 11.01 Prob > F = 0.0000
. xtreg desf fatind, i(cidade) be
Between regression (regression on group means) Number of obs = 900Group variable (i): cidade Number of groups = 20
R-sq: within = 0.5292 Obs per group: min = 45 between = 0.0213 avg = 45.0 overall = 0.4328 max = 45
F(1,18) = 0.39sd(u_i + avg(e_i.))= 50.18814 Prob > F = 0.5394
------------------------------------------------------------------------------ desf | Coef. Std. Err. t P>|t| [95% Conf. Interval]-------------+---------------------------------------------------------------- fatind | .0557246 .0890668 0.63 0.539 -.1313979 .2428471 _cons | 484.4386 33.81448 14.33 0.000 413.3971 555.4802------------------------------------------------------------------------------
Comparando o efeito do fator individual nos diferentes modelos...
------------------------------------------------------------------------------------------------------- Model | Coef. Std. Err. t P>|t| [95% Conf. Interval]---------------------+---------------------------------------------------------------------------------FE fatind | .7973167 .0253654 31.43 0.000 .7475329 .8471005
BE fatind | .0557246 .0890668 0.63 0.539 -.1313979 .2428471
RE fatind | .7416817 .0252383 29.39 0.000 .6922156 .7911478
mixed fatind | .7901859 .0278985 28.32 0.000 .7355057 .844866-------------------------------------------------------------------------------------------------------
Random intercept:xtmixed desf preditor || cidade:est store interceptRandom slope:xtmixed desf preditor || cidade: preditor, cov (un)est store slopeComparing quality of fit:lrtest intercept slope
. lrtest intercept slope
Likelihood-ratio test LR chi2(2) = 1.55(Assumption: intercept nested in slope) Prob > chi2 = 0.4611
Note: The reported degrees of freedom assumes the null hypothesis is not on the boundary of the parameter space. If this is not true, then the reported test is conservative.
141.230 homens e 336.637mulheres em 10 países europeus
Hermann et al. The association of education with body mass index and waist circumference in the EPIC-PANACEA study BMC Public Health 2011, 11:169
Petra Peeters
Hermann et al. The association of education with body mass index and waist circumference in the EPIC-PANACEA study BMC Public Health 2011, 11:169
Targeting Vs Universal approach!!!
Qual modelo de análise multínível eu devo
utilizar?
CPOD Capitais
0,0 ~ 1,1
1,2 ~ 2,6
2,7 ~ 4,4
CPOD Interior
1,74
2,16
3,26
3,41
3,97
Determinantes individuais e contextuais da cárie em crianças brasileiras de 12 anos em 2010
Modelo de intercepto:o efeito é fixo
Modelo de coeficiente:efeito variável e
interação interníveisGavin Turrell
Gary D. Slade
1. Variância robusta “r”2. Análise ponderada “pw”
3. Dependência espacial4. Amostra complexa (modo
survey) “svyset”
However, there are some limitations to the use of multilevel analysis in spatial research. Most importantly, multilevel analysis does not fully account for the spatial dependence present in data in that it does not allow for the effect of neighboring regions on the performance of a firm.
Frank G. Van Oort
Van Oort FG, Burger MJ, Knoben J, Raspe O. Multilevel approaches and the firm-agglomeration ambiguity in economic growth studies. Journal of Economic Surveys 2012; 26(3):468-91.
Dependência espacial
Sophia Rabe-Hesketh
Anders Skrondal