1 / 19
文档名称:

stata多元混合回归分析.pdf

格式:pdf   大小:465KB   页数:19页
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

stata多元混合回归分析.pdf

上传人:陈潇睡不醒 2021/3/27 文件大小:465 KB

下载得到文件列表

stata多元混合回归分析.pdf

文档介绍

文档介绍:Multilevel Analysis
(ver. )
Oscar Torres-Reyna
Data Consultant
******@
/
PU/DSS/OTR
Motivation
Use multilevel model whenever your data is grouped (or nested) in more than
one category (for example, states, countries, etc).
Multilevel models allow:
• Study effects that vary by entity (or groups)
• Estimate group level averages
Some advantages:
• Regular regression ignores the average variation between entities.
• Individual regression may face sample problems and lack of
generalization
2
PU/DSS/OTR
Variation between entities
use
bysort school: egen y_mean=mean(y)
twoway scatter y school, msize(tiny) || connected y_mean school, connect(L)
clwidth(thick) clcolor(black) mcolor(black) msymbol(none) || , ytitle(y)
40
20
y
0
-20
-40
0 20 40 60
school
Score y_mean 3
PU/DSS/OTR
statsby inter=_b[_cons] slope=_b[x1], by(school) saving(ols, replace): regress y x1
sort school
merge school using ols
drop _merge Individual regressions
gen yhat_ols = inter + slope*x1
sort school x1 (no-pooling approach)
separate y, by(school)
separat