Part 2
Mar 27, 2024
Quiz 04 - due March 28 at noon
Covers readings and lectures March 4 - 20
Longitudinal modeling, Chapter 9 of BMLR
Project 02
Final project - Round 1 submission (optional) due April 25
Write form of model for models with more than two levels
Interpret fixed and random effects at each level
See how three-level models are used in data analysis example
The data includes the price and characteristics for 918 houses sold between 1986 and 1991 in Southampton, England. The data were originally collected from a local real estate agency and were analyzed in Jones (1991). The primary variables of interest are
Note
You can access the paper on Canvas.The paper uses different symbols to represent parameters than what is in the textbook. The slides will follow the textbook.
\[ \begin{aligned} &Y_{ijk} = \alpha_0 + \tilde{u}_i + u_{ij} + \epsilon_{ijk} \\[5pt] &\tilde{u}_i \sim N(0, \sigma^2_{\tilde{u}}) \hspace{8mm} u_{ij} \sim N(0, \sigma^2_{u}) \hspace{8mm} \epsilon_{ijk} \sim N(0, \sigma^2) \end{aligned} \]
Level One (house within time)
\(Y_{ijk} = a_{ij} + \epsilon_{ijk}, \hspace{10mm} \epsilon_{ijk} \sim N(0, \sigma^2)\)
Level Two (time within district)
\(a_{ij} = a_i + u_{ij}, \hspace{10mm} u_{ij} \sim N(0, \sigma^2_u)\)
Level Three (district)
\(a_{i} = \alpha_0 + \tilde{u}_{i}, \hspace{10mm} \tilde{u}_{i} \sim N(0, \sigma^2_{\tilde{u}})\)
Interpret \(\hat{\beta}_0\) (this is \(\alpha_0\) in our model notation)
\[ \begin{aligned} Y_{ijk} &= \alpha_0 + \beta_1~age_{ijk} + \beta_2~detached_{ijk} + \beta_3 ~ bungalow_{ijk} \\ &+ \beta_4 ~ terrace_{ijk} + \beta_5~flat_{ijk} + \beta_6~bedrooms_{ijk} +\beta_7~heating_{ijk}\\ & + \beta_8~single_{ijk} + \beta_9 ~ double_{ijk} + [\tilde{u}_i + u_{ij} + \epsilon_{ijk}]\\[8pt] &\tilde{u}_i \sim N(0, \sigma^2_{\tilde{u}}) \hspace{8mm} u_{ij} \sim N(0, \sigma^2_{u}) \hspace{8mm} \epsilon_{ijk} \sim N(0, \sigma^2) \end{aligned} \]
Write the Level One, Level Two, Level Three models.
How does our understanding of the effect of bedrooms differ in this model compared to Model B?
Let’s consider the covariance structure between observations at different levels.
Suppose \(Y_1 = a_1 X_1 + a_2 X_2 + a_3\) and \(Y_2 = b_1 X_1 + b_2 X_2 + b_3\) where \(X_1\) and \(X_2\) are random variables and \(a_i\) and \(b_i\) are constants for \(i = 1, 2, 3\), then we know from probability theory that: \[{\small\begin{aligned}Var(Y_1) & = a^{2}_{1} Var(X_1) + a^{2}_{2} Var(X_2) + 2 a_1 a_2 Cov(X_1,X_2) \\[10pt] Cov(Y_1,Y_2) & = a_1 b_1 Var(X_1) + a_2 b_2 Var(X_2) + (a_1 b_2 + a_2 b_1) Cov(X_1,X_2)\end{aligned}}\]
We will use these properties to define the covariance structure of the observations in the model.
Let \(Y_{ijk}\) be the sales price for the house \(k\) in district \(i\) sold in time period \(j\), and \(x_1, \ldots, x_9\) be the house-level covariates. \[Y_{ijk} = \alpha_0 + \sum_{i = 1}^{9}\beta_ix_i + [\tilde{u}_i + u_{ij} + \epsilon_{ijk}]\] \[\tilde{u}_i \sim N(0, \sigma_{\tilde{u}}^2), \hspace{5mm} u_{ij} \sim N(0, \sigma^2_{u}), \hspace{5mm} \epsilon_{ijk} \sim N(0, \sigma^2)\]