11. Latent Variable and Measurement ModelsEPSY 8268

Latent Variables

In educational and social science research, we typically model observed data to estimate associations among unknown parameters. Because of theory, we can hypothesize the existence of latent variables, those traits, characteristics, and phenomena that are not directly observed but indirectly observed through indicators (item responses or observations). The theoretical part of this process argues for an underlying causal process: one’s position on the latent trait continuum causes the response to the indicator items; the latent variable generates the data. This gives us a framework for recovering that latent variable, which can then be used in the statistical modeling of associations among unknown parameters.

More generally, we can conceive of any variable with missing data as having latent components, since we have estimation routines that allow us to estimate parameters with missing data and uncover the underlying associations among variables. Similarly, the estimation of regression coefficients, intercepts and slopes, at level 1 in a typical HLM is a latent variable approach, since we model these unobserved variables at level 2 (we model the parameter estimates and estimate their reliability as estimates of their associated parameters).

A typical approach to model latent variables is through structural equation modeling (SEM). In that approach, we create a measurement model that describes the distributions of observed data as a result of latent variables, and then create a structural model describing the associations among the latent variables.

The Role of Measurement Error in Regression

Measurement error is a phenomenon that introduces variance in scores that is either nonsystematic and random or systematic and construct-irrelevant. Observed variance is composed of construct-relevant variance (true score variance) and random and systematic construct-irrelevant variance. The most difficult source of error is the systematic construct-irrelevant variance, which in the absence of additional information, interferes in score interpretation (a validity issue). An example is testwiseness or test anxiety – such traits will systematically influence scores (performance) and so become part of the stable or true variance in scores, thus interfering with our interpretation of one’s level of the trait or construct (e.g., true achievement). Random error, on the other hand, is unsystematic and adds unsystematic variance to scores (which attenuates effect size estimates and statistical power). Because of that, we have methods of estimating and accounting for random error variance.

The important thing to note is that random error variance uniformly affects statistical analyses, attenuating all effect sizes and reducing power to detect effects if they exist in the population. Regarding regression outcome variables, random measurement error does not bias regression coefficients, but does reduce regression precision and statistical power. Measurement error in the predictors is a violation of the regression assumptions, as it will bias regression coefficients toward zero, thus affecting its conditioning effect on other regression coefficients in the model.

A SEM can be conceived of as an HLM. The level-1 model is a measurement model that describes the associations between observed variables and latent variables. The level-2 model describes associations among the latent variables.

Modeling Measurement Error

As a hypothetical example, consider the case where we know the reliabilities of measures because of measurement analysis of those measures prior to use in HLM. Then we know the measurement error in a set of observed data. So consider the level-1 model with measurement errors e associated with each measure.

Level-1 Model

Yij = Dzij(Zj + ezj) + D1ij(X1j + e1j) + D2ij(X2j + e2j)

In our example, we know the variances of the errors since we know the reliabilities (.85, .90, and .70 respectively). Recall that the standard deviation of measurement error (standard error of measurement) is thus the variance is .

ezj ~ N(0, 4.52), e1j ~ N(0, 2.62),e2j ~ N(0, 4.92)[from the example in the book]

In matrix notation, this can be represented as Yj = Dj (Yj* + ej), where ej ~ N(0, Vj)

Y is the vector of observed variables, D is the matrix of indicators (nj × 3) indicating which latent variable is observed at each occassion, Y* is the vector of latent values, and e is the vector of measurement errors, and V is a diagonal matrix with the measurement errors from above on the diagonal.

Level-2 Model

The level-2 model describes the distribution of the latent data.

Zj = γz + uzj , X1j = γ1 + u1j ,X2 = γ2 + u2j , where

The γs are the means of each latent measure, since the errors are captured in the es.

The results illustrate the effect of estimation with measurement error:

HLM accounting for measurement error / OLS, not accounting for measurement error
Predictor / Coefficient (se) / Coefficient (se)
Intercept / -3.61 (19.16) / 2.73 (17.49)
X1 / 0.729 (0.287) / 0.701 (0.277)
X2 / 0.355 (0.382) / 0.262 (0.286)

Reconceiving Growth Modeling

In a growth model, we can conceive of initial status (intercept) and growth rate (slope) as latent variables, and potentially use one latent variable (initial status) to predict the other (growth).

Consider an example of growth in mathematics across grades 8, 10, and 12, as a function of sex and initial status.

Level-1 Model

Yti = π0i + π1i (grade – 8)ti + eti

Level-2 Models

π0i = β00 + β01 (Female)i + u0i

π1i = β10 + β11 (Female)i + u1i

π1i = α10 + α11 (Female)i + α12 (π0i) + u*1i

α11is the direct effect of sex on growth (the difference in growth rate between females and males, holding constant initial status)

β11 - α11 (α12β01) is the indirect effect of gender on growth as a function of sex differences in initial status

α12 is the association between initial status and growth rate within sex

In other words,

β10 and β11 are the original coefficients

α10 and α11 are the adjusted coefficients

Example from the EG growth data

Consider the model:

Mathti = π0i + π1i(Year)ti + etiwhere eti ~ N(0, 2).

π0i = β00 + β01(Female)i + r0iwhere r0i~ N(0, 00).

π1i = β10 + β11(Female)i + r1iwhere r1i~ N(0, 11), also with covariance, 01.

In [Other Settings], select [Estimation Settings], then [Latent Variable Regression]

Final estimation of fixed effects:

Fixed Effect / Coefficient / Standard
error / t-ratio / Approx.
d.f. / p-value
For INTRCPT1, π0
INTRCPT2, β00 / -0.729318 / 0.077162 / -9.452 / 348 / <0.001
FEMALE, β01 / -0.025769 / 0.102796 / -0.251 / 348 / 0.802
For YEAR slope, π1
INTRCPT2, β10 / 0.775848 / 0.022305 / 34.784 / 348 / <0.001
FEMALE, β11 / -0.035422 / 0.029725 / -1.192 / 348 / 0.234

Latent Variable Regression Results

The model specified (in equation format)
π1 = β10* + β11*(FEMALE) + β12*(π0) + r1*

Outcome / Predictor / Estimated
Coefficient / Standard
Error / t-ratio / p-value
YEAR ,π1 / INTRCPT2 ,β10* / 0.845261 / 0.024767 / 34.128 / 0.000
FEMALE ,β11* / -0.032970 / 0.028932 / -1.140 / 0.255
π0,β12* / 0.095174 / 0.016397 / 5.804 / 0.000

Latent Variable Regression: Comparison of Original and Adjusted Coefficients

Outcome / Predictor / Original
Coefficient / Adjusted
Coefficient / Difference / Standard
Error
Difference
YEAR ,π1 / INTRCPT2 / 0.77585 / 0.84526 / -0.06941 / 0.027847
FEMALE / -0.03542 / -0.03297 / -0.00245 / 0.009793

Same Example with HMLM

Level-1 Model

MATHmi = (IND1mi)*MATH1i* + (IND2mi)*MATH2i* + (IND3mi)*MATH3i* + (IND4mi)*MATH4i* + (IND5mi)*MATH5i* + (IND6mi)*MATH6i*
MATHti* = π0i + π1i*(YEARti) + εti

Level-2 Model

π0i = β00 + β01*(FEMALEi)
π1i = β10 + β11*(FEMALEi)

Final estimation of fixed effects:

Fixed Effect / Coefficient / Standard
error / t-ratio / Approx.
d.f. / p-value
For INTRCPT1, π0
INTRCPT2, β00 / -0.729319 / 0.077159 / -9.452 / 348 / <0.001
FEMALE, β01 / -0.025772 / 0.102792 / -0.251 / 348 / 0.802
For YEAR slope, π1
INTRCPT2, β10 / 0.775846 / 0.022303 / 34.786 / 348 / <0.001
FEMALE, β11 / -0.035422 / 0.029724 / -1.192 / 348 / 0.234

Latent Variable Regression Results

The model specified (in equation format)π1 = β10* + β11*(FEMALE) + β12*(π0) + r1*

Outcome / Predictor / Estimated
Coefficient / Standard
Error / t-ratio / p-value
YEAR,r1,π1 / INTRCPT2 ,β10* / 0.845290 / 0.024765 / 34.132 / 0.000
FEMALE ,β11* / -0.032968 / 0.028929 / -1.140 / 0.255
π0,β12* / 0.095217 / 0.016396 / 5.807 / 0.000

Latent Variable Regression: Comparison of Original and Adjusted Coefficients

Outcome / Predictor / Original
Coefficient / Adjusted
Coefficient / Difference / Standard
Error of
Difference
YEAR,r1,π1 / INTRCPT2 / 0.77585 / 0.84529 / -0.069444 / 0.027848
FEMALE / -0.03542 / -0.03297 / -0.002454 / 0.009797

An Example for Missing Data

In an artificial data set, we can conceive of an outcome and two predictors (PRED1 and PRED2). Some participants are missing one or two (of the three) measures. The data can be reformatted where the three measures are considered occasions of measurement – then we can use HMLM for estimation.

Under complete data, we have R = 3 for each person. The “measures” can be reconceived of as MEASUREij, where a datum is collected at occasion i for participant j, where nj ≤ R = 3. With complete data, we have:

MEASURE1j = OUTCOMEj

MEASURE2j = PRED1j

MEASURE3j = PRED2j

In HMLM, we create three indicators IND1j, IND2j, and IND3j to indicate whether MEASURE is the OUTCOMEj, PRED1j, or PRED2j. The level-2 data file includes the observed data on the measures and the three indicators. Level-2 data file includes a dummy variable (DUMMY) to be used in the analysis. This can be estimated in a no intercepts model.

SPECIFICATION IN HLM: In Basic Settings, treat Level-1 Variance as Unrestricted.

Level-1 Model

MEASURESmi = (IND1mi)*MEASURES1i* + (IND2mi)*MEASURES2i* + (IND3mi)*MEASURES3i*
MEASURESti* = π1i*(IND1ti) + π2i*(IND2ti) + π3i*(IND3ti)

Level-2 Model

π1i = β10 + u1i
π2i = β20 + u2i
π3i = β30 + u3i

Final estimation of fixed effects:

Fixed Effect / Coefficient / Standard
error / t-ratio / Approx.
d.f. / p-value
For IND1 slope, π1
INTRCPT2, β10 / 52.255651 / 2.835828 / 18.427 / 14 / <0.001
For IND2 slope, π2
INTRCPT2, β20 / 53.828213 / 2.080565 / 25.872 / 14 / <0.001
For IND3 slope, π3
INTRCPT2, β30 / 53.051808 / 2.221131 / 23.885 / 14 / <0.001

Latent Variable Regression Results

The model specified (in equation format)
π1 = β10* + β11*(π2) + β12*(π3) + r1*

Outcome / Predictor / Estimated
Coefficient / Standard
Error / t-ratio / p-value
IND1 ,π1 / INTRCPT2 ,β10* / -23.966159 / 14.173726 / -1.691 / 0.117
π2,β11* / 0.879462 / 0.232665 / 3.780 / 0.003
π3,β12* / 0.544410 / 0.220194 / 2.472 / 0.029

Latent Variable Regression: Comparison of Original and Adjusted Coefficients

Outcome / Predictor / Original
Coefficient / Adjusted
Coefficient / Difference / Standard
Error of
Difference
IND1 ,π1 / INTRCPT2 / 52.25565 / -23.96616 / 76.221809 / 14.285875

A Measurement Model

Level-1 Model

Ymtij = ψ0tij + εmtijwhere εmtij ~ N(0,

Y is the observed measure for individual i in group j.

ψtij is the true or latent value of the measure.

εmtij is the measurement error associated with the observed measure mon occasion tfor individual i in group j.

This could be specified based on measurements generated from the Rasch model, where the standard error of measurement estimate, smtij, for each measure is known. To accomplish this, we multiply both sides of the equation by the inverse of the standard error (the precision), amtij = , resulting in

Y*mtij = amtijψ0tij + e*mtijwhere e*mtij ~ N(0, 1

When the model is specified, a number of unique settings are considered.

  1. The outcome is the level-1 measure, m. The inverse standard error (from the Rasch model) is a level-1 predictor. The intercept is removed and the level-1 random effect is fixed at 1.0.
  2. The level-1 coefficient associated with the inverse standard error becomes the outcome variable – as the coefficient now represents the latent score on occasion t. At level-2, we model this outcome as a function of occasion and specify a linear growth model over time, including initial status and growth rate.
  3. The true scores from level-2 outcomes are specified as randomly varying between individuals.
  4. A level-3 model can be specified employing different level-3 predictors for each level-3 equation.
  5. A level-4 model can be specified employing different level-4 predictors.

The example of Teacher Expertise in literacy instruction, in a four-level model of a measurement model (level-1), a growth model at level-2, teachers at level-3, and schools at level-4.

When constructing the MDM, select HMLM2 and the Structure of the Data is “longitudinal with measurement model at level-1”.

Level-1 Model

EXPERTIS mtij = ψ1tij*(INVSTDERmtij)

Level-2 Model

ψ1tij = π10ij + π11ij*(OCCASIONtij) + e1tij

Level-3 Model

π10ij = β100j + r10ij
π11ij = β110j + r11ij

Level-4 Model

β100j = γ1000 + u100j
β110j = γ1100 + u110j

σ2e

INVSTDER,ψ1 / 0.37252

σ2e (as correlations)

INVSTDER,ψ1 / 1.000
Random level-1 coefficient / Reliability estimate
INVSTDER / 0.842

τπ

INVSTDER / INVSTDER
INTRCPT2,π10 / OCCASION,π11
0.98674 / 0.02671
0.02671 / 0.00098

τπ (as correlations)

INVSTDER/INTRCPT2,π10 / 1.000 / 0.859
INVSTDER/OCCASION,π11 / 0.859 / 1.000
Random level-2 coefficient / Reliability estimate
INVSTDER/INTRCPT2 / 0.726
INVSTDER/OCCASION / 0.060

Note: The reliability estimates reported above are based on only 214 of 219units that had sufficient data for computation. Fixed effects and variancecomponents are based on all the data.
τβ

INVSTDER / INVSTDER
INTRCPT2 / OCCASION
INTRCPT3,β100 / INTRCPT3,β110
0.38380 / -0.04951
-0.04951 / 0.04043

τβ (as correlations)

INVSTDER/INTRCPT2/INTRCPT3,β100 / 1.000 / -0.397
INVSTDER/OCCASION/INTRCPT3,β110 / -0.397 / 1.000
Random level-3 coefficient / Reliability estimate
INVSTDER/INTRCPT2/INTRCPT3 / 0.772
INVSTDER/OCCASION/INTRCPT3 / 0.965

Final estimation of fixed effects

Fixed Effect / Coefficient / Standard
error / t-ratio / Approx.
d.f. / p-value
For INVSTDER, ψ1
For INTRCPT2, π1 0
For INTRCPT3, β1 0 0
INTRCPT4, γ1 0 0 0 / 0.073155 / 0.170889 / 0.428 / 32 / 0.671
For OCCASION, π1 1
For INTRCPT3, β1 1 0
INTRCPT4, γ1 1 0 0 / 0.188121 / 0.049635 / 3.790 / 32 / <0.001

Final estimation of level-1 and level-2 variance components

Random Effect / Standard
Deviation / Variance
Component / d.f. / χ2 / p-value
INVSTDER,e1 / 0.61035 / 0.37252 / 1079 / 5369.65506 / <0.001

Note: The chi-square statistics reported above are based on only 1312 of 1317units that had sufficient data for computation. Fixed effects and variancecomponents are based on all the data.

Final estimation of level-3 variance components

Random Effect / Standard
Deviation / Variance
Component / d.f. / χ2 / p-value
INVSTDER/INTRCPT2,r10 / 0.99335 / 0.98674 / 196 / 653.14641 / <0.001
INVSTDER/OCCASION,r11 / 0.03131 / 0.00098 / 196 / 260.37047 / 0.002

Note: The chi-square statistics reported above are based on only 214 of 219units that had sufficient data for computation. Fixed effects and variancecomponents are based on all the data.

Final estimation of level-4 variance components

Random Effect / Standard
Deviation / Variance
Component / d.f. / χ2 / p-value
INVSTDER/ INTRCPT2/INTRCPT3,u100 / 0.61952 / 0.38380 / 16 / 77.19320 / <0.001
INVSTDER/ OCCASION/INTRCPT3,u110 / 0.20107 / 0.04043 / 16 / 613.56795 / <0.001

Item Response Models

P items are developed to measure a single ability or trait, and these items are administered to J test takers. In this model, the items are scored as correct (1) or incorrect (0). The Rasch model, a one-parameter item response model, is specified to estimate the log-odds of a correct response, as a function of person j ability and item p difficulty.

The typical formulation of the Rasch (1 parameter) model is a function of person j ability θ and item idifficultyb.

Working with logits (log-odds) through the HGLM framework, we reorganize the model

In the logit link function notation of HLM, we have the log-odds link as a function of the difference between person ability α and item difficulty δ

ηjp = αj – δp

To define the scale in logits, we set persons or items to have a mean of 0. Then, the probability that examinee j correctly answers item p is

This is the same formula we saw earlier in the case of regressing binomial outcomes, where we employ the logit link function (the log-odds of c success), ηij , and want to turn that log-odds into a probability.

In a standard Rasch IRT model, person abilities and item difficulties are fixed. In the HLM formulation of the Rasch model, person abilities vary randomly over a population of test takers.

Level-1 Model

The sampling model is Bernoulli (a binomial sampling model where there is m = 1 trial). Yij = 1 with probability φij. We use the logit link function

The level-1 model is then

π0jis person j ability

Xpijis a dummy indicator variable that = 1 if response i for person j is to item p, 0 otherwise

πpjis the difference in log-odds of a correct response between item p and a reference item (omitted due to redundancy) for person j

The difficulty of the reference item is arbitrarily set to 0.

The only reason why there are two subscripts is to account for the instance that person j might not have a respond i for every item p.

Level-2 Model

We have two sets of parameters estimated at level-1 including person abilities (π0j) and item difficulties or item effects (πpj ). To emulate the Rasch model, we fix all of the item effects

π0j = β0j + u0jwhere u0j ~ N(0, τ00)

πpj = βp0 for p > 0.

τ00 is the variance of abilities in the population.

Item effects are fixed (invariant) across examinees.

The log-odds that person j will respond correctly to item p is β00 + u0j for the reference item and β00 + βp0 + u0j for any other item p.

Returning to the Rasch model ηjp = αj – δp

Person j ability is αj = π0j = β00 + u0j

Item difficulty of the reference item is δp = 0

and for all other items pδp = – β0p

  • Differences in item difficulties are given by differences between regression coefficients
  • Differences in person abilities are given by differences in random intercepts
  • Item difficulties and person abilities are on an interval scale defined in logit metric.

Source: Raudenbush, S.W. & Bryk, A.S. (2002). Hierarchical Linear Models. Applications and Data Analysis Methods (2nd ed., pp. 336-372). Sage Publications.

1