英国诺丁汉大学讲义如何估计随机效应模型stata
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
A typical 2-level model is
yij 0xij1uj eij
uj ~N(0,u2),eij ~N(0,e2)
Here i indexes pupils and j indexes schools.
MLwiN
• Software package designed specifically for fitting multilevel models.
• Developed by a team led by Harvey Goldstein and Jon Rasbash at the Institute of Education in London over past 15 years or so. Earlier incarnations ML2, ML3, MLN.
2. Simulation-based Bayesian methods e.g. MCMC that attempt to draw samples from the posterior distribution of the model.
MCMC Algorithm
• Consider the 2-level model yij 0xij1uj eij uj ~N(0,u2),eij ~N(0,e2)
• Random effect modelling, MCMC and MLwiN. • Methods comparison – Guatemalan child health
example. • Extendibility of MCMC algorithms: • Cross classified and multiple membership
,u,u2,e2
• We will add prior distributions
p(),p(u 2),p(e2)
MCMC Algorithm (2)
The algorithm for this model then involves simulating in turn from the 4 sets of conditional distributions. Such an algorithm is known as Gibbs Sampling. MLwiN uses Gibbs sampling for all normal response models.
p(
|y,u(0),
, 2
u(0)
) 2
e(0)
To get (1) .
MCMC Algorithm (3)
We next sample from
p(u|y,
models. • Artificial insemination and Danish chicken
examples. • Further Extensions.
Random effect models
• Models that account for the underlying structure in the dataset.
MCMC Estimation for Random Effect Modelling – The MLwiN
experience
Dr William J. Browne School of Mathematical Sciences
University of Nottingham
Contents
• Originally developed for nested structures (multilevel models), for example in education, pupils nested within schools.
• An extension of linear modelling with the inclusion of random effects.
Firstly we set starting values for each group of unknown
parameters,
(0),u(0),
, 2
u(0)
2 e(0)
Then sample from the following conditional distributions,
Βιβλιοθήκη Baidu
firstly
• Originally contained ‘classical’ IGLS estimation methods for fitting models.
• MLwiN launched in 2019 also included MCMC estimation.
• My role in team was as developer of MCMC functionality in MLwiN during 4.5 years at the IOE.
• MCMC algorithms work in a Bayesian framework and so we need to add prior distributions for the unknown parameters.
• Here there are 4 sets of unknown parameters:
Estimation Methods for Multilevel
Models
Due to additional random effects no simple matrix formulae exist for finding estimates in multilevel models.
Two alternative approaches exist:
1. Iterative algorithms e.g. IGLS, RIGLS, EM in HLM that alternate between estimating fixed and random effects until convergence. Can produce ML and REML estimates.
yij 0xij1uj eij
uj ~N(0,u2),eij ~N(0,e2)
Here i indexes pupils and j indexes schools.
MLwiN
• Software package designed specifically for fitting multilevel models.
• Developed by a team led by Harvey Goldstein and Jon Rasbash at the Institute of Education in London over past 15 years or so. Earlier incarnations ML2, ML3, MLN.
2. Simulation-based Bayesian methods e.g. MCMC that attempt to draw samples from the posterior distribution of the model.
MCMC Algorithm
• Consider the 2-level model yij 0xij1uj eij uj ~N(0,u2),eij ~N(0,e2)
• Random effect modelling, MCMC and MLwiN. • Methods comparison – Guatemalan child health
example. • Extendibility of MCMC algorithms: • Cross classified and multiple membership
,u,u2,e2
• We will add prior distributions
p(),p(u 2),p(e2)
MCMC Algorithm (2)
The algorithm for this model then involves simulating in turn from the 4 sets of conditional distributions. Such an algorithm is known as Gibbs Sampling. MLwiN uses Gibbs sampling for all normal response models.
p(
|y,u(0),
, 2
u(0)
) 2
e(0)
To get (1) .
MCMC Algorithm (3)
We next sample from
p(u|y,
models. • Artificial insemination and Danish chicken
examples. • Further Extensions.
Random effect models
• Models that account for the underlying structure in the dataset.
MCMC Estimation for Random Effect Modelling – The MLwiN
experience
Dr William J. Browne School of Mathematical Sciences
University of Nottingham
Contents
• Originally developed for nested structures (multilevel models), for example in education, pupils nested within schools.
• An extension of linear modelling with the inclusion of random effects.
Firstly we set starting values for each group of unknown
parameters,
(0),u(0),
, 2
u(0)
2 e(0)
Then sample from the following conditional distributions,
Βιβλιοθήκη Baidu
firstly
• Originally contained ‘classical’ IGLS estimation methods for fitting models.
• MLwiN launched in 2019 also included MCMC estimation.
• My role in team was as developer of MCMC functionality in MLwiN during 4.5 years at the IOE.
• MCMC algorithms work in a Bayesian framework and so we need to add prior distributions for the unknown parameters.
• Here there are 4 sets of unknown parameters:
Estimation Methods for Multilevel
Models
Due to additional random effects no simple matrix formulae exist for finding estimates in multilevel models.
Two alternative approaches exist:
1. Iterative algorithms e.g. IGLS, RIGLS, EM in HLM that alternate between estimating fixed and random effects until convergence. Can produce ML and REML estimates.