Home Business & Economics Introduction to Latent Variable Estimation for Undergraduate Econometrics: An Application with Disney Theme Park Ride Wait Times
Article
Licensed
Unlicensed Requires Authentication

Introduction to Latent Variable Estimation for Undergraduate Econometrics: An Application with Disney Theme Park Ride Wait Times

  • Jonathan James EMAIL logo
Published/Copyright: December 25, 2023
Become an author with De Gruyter Brill

Abstract

This paper describes a simple and interesting application of structural equation modeling for a single lecture in an undergraduate econometrics course to introduce students to the concept of using data to recover latent variables. The application centers around using hourly observations on ride wait times at Disney’s Magic Kingdom to infer how crowded it is at the theme park. Pedagogically, the material is presented in the context of the linear regression model, so the discussion works to enhance students’ understanding of core material, not to introduce new disparate methods. The application provides interesting economic-based insights, like which ride’s wait times are categorically most informative about how crowded it is at the park.

JEL Classification: A22

Corresponding author: Jonathan James, Department of Economics, California Polytechnic State University, San Luis Obispo, CA, USA, E-mail:

Appendix

A R Code

## Read in the data and remove missing

data = read.csv(’DISNEYMK_WAIT.csv’)

data = data[!is.na(data$SpaceMtn),]

data = data[!is.na(data$HauntedMansion),]

data = data[!is.na(data$PeterPan),]

## Calculate Moments

mean_SPC = mean(data$SpaceMtn)

mean_PAN = mean(data$PeterPan)

mean_HNT = mean(data$HauntedMansion)

cov_SPC_PAN = cov(data$SpaceMtn,data$PeterPan)

cov_SPC_HNT = cov(data$SpaceMtn,data$HauntedMansion)

cov_PAN_HNT = cov(data$PeterPan,data$HauntedMansion)

var_SPC = var(data$SpaceMtn)

var_PAN = var(data$PeterPan)

var_HNT = var(data$HauntedMansion)

round(c(mean_SPC,mean_PAN,mean_HNT,

        cov_SPC_PAN,cov_SPC_HNT,cov_PAN_HNT,

        var_SPC,var_PAN,var_HNT),2)

## Parameter Estimates

a_SPC = mean_SPC

a_PAN = mean_PAN

a_HNT = mean_HNT

b_SPC = sqrt((cov_SPC_PAN*cov_SPC_HNT)/cov_PAN_HNT)

b_PAN = cov_SPC_PAN/b_SPC

b_HNT = cov_SPC_HNT/b_SPC

sig2_SPC = var_SPC - (b_SPC ^ 2)

sig2_PAN = var_PAN - (b_PAN ^ 2)

sig2_HNT = var_HNT - (b_HNT ^ 2)

round(c(a_SPC,a_PAN,a_HNT,

        b_PAN,b_HNT,b_SPC,

        sig2_SPC,sig2_PAN,sig2_HNT),1)

## Parameters Simple Linear Prediction Equations

th_SPC = (b_SPC/sig2_SPC)/((b_SPC ^ 2/sig2_SPC) + 1)

k_SPC = - a_SPC*th_SPC

th_PAN = (b_PAN/sig2_PAN)/((b_PAN ^ 2/sig2_PAN) + 1)

k_PAN = - a_PAN*th_PAN

th_HNT = (b_HNT/sig2_HNT)/((b_HNT ^ 2/sig2_HNT) + 1)

k_HNT = - a_HNT*th_HNT

round(c(k_SPC,k_PAN,k_HNT),4)

round(c(th_SPC,th_PAN,th_HNT),4)

## Parameters Multiple Linear Prediction Equation

com_denom = (b_SPC ^ 2/sig2_SPC) +

 (b_PAN ^ 2/sig2_PAN) + (b_HNT ^ 2/sig2_HNT) + 1

p_SPC = (b_SPC/sig2_SPC)/com_denom

p_PAN = (b_PAN/sig2_PAN)/com_denom

p_HNT = (b_HNT/sig2_HNT)/com_denom

p_0 = -a_SPC*p_SPC - a_PAN*p_PAN - a_HNT*p_HNT

round(c(p_0,p_SPC,p_PAN,p_HNT),4)

## Add predicted crowdedness to data

data$crwd = p_0 + p_SPC*data$SpaceMtn +

 p_PAN*data$PeterPan + p_HNT*data$HauntedMansion

Reference

Wooldridge, J. M. 2020. Introductory Econometrics: A Modern Approach, 7th ed. Boston: Cengage Learning.Search in Google Scholar

Received: 2023-07-10
Accepted: 2023-12-03
Published Online: 2023-12-25

© 2023 Walter de Gruyter GmbH, Berlin/Boston

Downloaded on 3.2.2026 from https://www.degruyterbrill.com/document/doi/10.1515/jem-2023-0030/html
Scroll to top button