EPsy 8252 Notes
Introduction
1
R Markdown
Preparation
1.1
Notes
1.2
Other Resources
Pretty-Printing Tables in Markdown
Summary Statistics Table
Correlation Table
Regression Table: Single Model
Regression Table: Multiple Models
2
Nonlinearity: Log-Transforming the Predictor
Preparation
2.1
Dataset and Research Question
2.2
Log-Transformation of a Variable
2.2.1
Quick Refresher on Logarithms
2.2.2
Log-Transforming Variables
2.3
Fitting the Regression Model
2.3.1
Examine the Assumption of Linearity
2.3.2
Interpret the Regression Results
2.3.3
Better Interpretations: Back-transforming
2.4
Alternative Method of Fitting the Model
2.5
Plotting the Fitted Model
2.6
Different Base Values in the Logarithm
2.6.1
Comparing the Output from the Two Bases
2.7
Base-
\(e\)
Logarithm: The Natural Logarithm
2.7.1
Using the Natural Logarithm in a Regression Model
2.8
Including Covariates
2.8.1
Plot of the Model Results
2.9
Polynomial Effects vs. Log-Transformations
Other Resources
3
Nonlinearity: Log-Transforming the Outcome
Preparation
3.1
Dataset and Research Question
3.2
Examine Relationship between Age and Budget
3.3
Transform the Outcome Using the Natural Logarithm (Base-e)
3.4
Re-analyze using the Log-Transformed Budget
3.5
Interpreting the Regression Output
3.5.1
Back-Transforming: A More Useful Interpretation
3.5.2
Substituting in Values for Age to Interpret Effects
3.5.3
Approximate Interpretation of the Slope
3.6
Plotting the Fitted Model
3.7
Relationship between MPAA Rating and Budget
3.7.1
Regression Model
3.7.2
Mathematical Explanation
3.7.3
Approximate Interpretations
3.8
Multiple Regression: Main Effects Model
3.8.1
Nested F-Test
3.8.2
Coefficient-Level Interpretation
3.8.3
Plot of the Fitted Model
3.9
Multiple Regression: Interaction Model
Log Transformations: Some Final Thoughts
Power Transformations
Ladder of Transformations
Rule of the Bulge
4
Probability Distributions
Preparation
4.1
Dataset and Research Question
4.2
Normal Distribution
4.2.1
Other Useful R Functions for Working with Probability Distributions
4.2.2
Finding Cumulative Probability
4.2.3
Cumulative Density and
\(p\)
-Value
4.2.4
Finding Quantiles
4.3
Student’s
\(t\)
-Distribution
4.3.1
Comparing Probability Densities
4.3.2
Comparing Cumulative Densities
4.4
Using the
\(t\)
-Distribution in Regression
4.5
Model-Level Inference: The
\(F\)
-Distribution
4.5.1
Testing the Model-Level Null Hypothesis
4.6
Mean Squares are Variance Estimates
5
Maximum Likelihood Estimation
Preparation
5.1
Dataset and Research Question
5.2
Joint Probability Density
5.3
Likelihood
5.4
Maximum Likelihood
5.4.1
Method 1: Grid Search
5.4.2
Log-Likelihood
5.5
Maximum Likelihood Estimation for Regression
5.5.1
Large Search Spaces
5.6
ML Estimation in Regression Using R
5.6.1
Using R to Directly Compute the Likelihood and Log-Likelihood
5.7
Way, Way, Way too Much Mathematics
6
Information Criteria for Model Selection
Preparation
6.1
Dataset and Research Question
6.2
Model-Building
6.2.1
Exploration of the Outcome
6.2.2
Building the Student-Related Factors Model
6.2.3
Building the Faculty-Related Factors Model
6.2.4
Building the Institution-Related Factors Model
6.3
Candidate Statistical Models
6.4
Log-Likelihood
6.5
Deviance: An Alternative Fit Value
6.6
Akiake’s Information Criteria (AIC)
6.7
Empirical Support for Hypotheses
7
Model Evidence
Preparation
7.1
Dataset and Research Question
7.2
Corrected AIC (AICc): Adjusting for Model Complexity and Sample Size
7.3
Model-Selection Uncertainty
7.4
Relative Likelihood and Evidence Ratios
7.5
Model Probabilities
7.6
Tables of Model Evidence
7.7
Some Final Thoughts
7.8
Pretty Printing Tables of Model Evidence
Other Resources
8
Introduction to Mixed-Effects Models
Preparation
8.1
Dataset and Research Question
8.2
Join the Student- and Classroom-Level Data
8.3
Fixed-Effects Regression Model
8.3.1
Residual Analysis
8.4
Conceptual Idea of Mixed-Effects Models
8.5
Fitting the Mixed-Effects Regression Model in Practice
8.6
Example 2: Life Satisfaction of NBA Players
8.6.1
Fit the Mixed-Effects Model
9
Linear Mixed-Effects Models: Cross-Sectional Analysis
Preparation
10
Linear Mixed-Effects Models: Alternative Representations and Assumptions
Preparation
11
Linear Mixed-Effects Models: Longitudinal Analysis
Preparation
Data Codebooks
ed-schools-2018.csv
evaluations.csv
fci-2015.csv
graduation.csv
mn-schools.csv
movies.csv
nba-player-data.csv and nba-team-data.csv
netherlands-students.csv and netherlands-schools.csv
nhl.csv
popular-classroom.csv and popular-student.csv
riverview.csv
same-sex-marriage.csv
vocabulary.csv
wine.csv
References
Published with bookdown
EPsy 8252 Notes
Unit 9:
Linear Mixed-Effects Models: Cross-Sectional Analysis
Preparation
Before class you will need to read:
Hayes, A. F. (2006).
A primer on multilevel modeling
.
Human Communication Research, 32
(4), 385–410.