Slides met notities

Analysis of covariance (ANCOVA) for reducing unexplained variance

Core idea

  • ANCOVA is a statistical technique that combines ANOVA and regression to control for the effects of continuous covariates on a dependent variable 5.
  • It aims to reduce unexplained variance (error variance) by accounting for the influence of these covariates 5.

Key facts

  • The general linear model is the foundation: y=β0+β1x1+β2x2+⋯+βkxk+uy = \beta_0 + \beta_1x_1 + \beta_2x_2 + \dots + \beta_kx_k + u 5.
  • Ordinary Least Squares (OLS) estimators minimize the sum of squared residuals: min⁡b(Y−Xb)′(Y−Xb)=U^′U^\min_b (Y - Xb)'(Y - Xb) = \hat{U}'\hat{U} 7.
  • Under Gauss-Markov assumptions (E(ui)=0, var(ui)=σ², cov(ui,uj)=0), OLS estimators are unbiased and consistent 9.
  • Statistical inference on parameters (βi\beta_i) requires an additional assumption: residuals are normally distributed (ui∼Nu_i \sim N) 12.
  • Total Sum of Squares (SSTO) represents total variation in the response 13.
  • Regression Sum of Squares (SSR) is the variation explained by the model 13.
  • Error Sum of Squares (SSE) is the unexplained variation, equal to the sum of squared residuals 13.
  • Hypothesis testing compares unexplained variation in a full model versus a reduced model (under H0) 14.
  • The F-test statistic for hypothesis testing is SSE(H0)−SSE(F)q/SSE(F)n−k−1∼Fq,n−k−1\frac{SSE(H_0) - SSE(F)}{q} / \frac{SSE(F)}{n-k-1} \sim F_{q, n-k-1} 16.
  • Multicollinearity occurs when explanatory variables are highly correlated, leading to large differences in various Sum of Squares .
  • Variance Inflation Factor (VIFi_i) = 11−Ri2\frac{1}{1-R_i^2} checks for multicollinearity; VIF > 10 indicates serious issues .
  • Extreme x-values are identified by leverage values (hiih_{ii}) from the hat matrix (H=X(X′X)−1X′H = X(X'X)^{-1}X') .
  • Rule of thumb for extreme leverage: hii>2(k+1)/nh_{ii} > 2(k+1)/n .
  • Studentized deleted residuals (di∗d_i^*) are used to detect extreme y-values .
  • Cook's distance (DiD_i) assesses the influence of an observation on all parameter estimates .
  • Dummy coding uses indicator variables for categorical predictors; one category is set as the reference .

Key concepts

  • Linear Model: A model where the dependent variable is a linear combination of independent variables plus an error term 5.
  • OLS Estimation: A method to estimate model parameters by minimizing the sum of squared differences between observed and predicted values 7.
  • Gauss-Markov Assumptions: Core assumptions about the error term that ensure OLS estimators are BLUE (Best Linear Unbiased Estimators) 9.
  • R-squared (R2R^2): A measure of the proportion of variance in the response variable explained by the model 17 .
  • Adjusted R-squared (Radj2R^2_{adj}): An adjusted version of R-squared that accounts for the number of predictors .
  • Marginal Contribution: The unique explanatory value of a variable given that other variables are already in the model 19.
  • Sum of Squares Types (I, II, III): Different methods to partition the total variation and attribute it to individual predictors, especially relevant with interactions .

Implications


  • Analysis of Covariance (ANCOVA) augments ANOVA models with quantitative covariates to reduce unexplained variance and increase test power 39.
  • It's used when homogeneous blocks are impossible to form, but a covariate is related to the response and not influenced by treatments 39.
  • The covariate must be measured before the study and related to the response to effectively reduce SSE 39.
  • ANCOVA extends ANOVA by including covariates to reduce residual variance and improve conclusion validity 39.
  • The goal is to increase the power of ANOVA tests by leveraging extra information 39.
  • A valid covariate must be correlated with the response variable 39.
  • Covariates should ideally be measured before treatments are applied to avoid being influenced by them 39.
  • The time devoted to a course would not be a valid covariate if it could be influenced by the treatment 39.
  • A model with rr factor levels and 1 covariate is represented as yij=μ+αi+γxij+uijy_{ij} = \mu + \alpha_i + \gamma x_{ij} + u_{ij} 40.
  • In this model, μ\mu is the intercept, αi\alpha_i is the effect of the ii-th treatment, γ\gamma is the effect of the covariate, and xijx_{ij} is the covariate value 40.
  • The expected value is E(yij)=μ+αi+γxijE(y_{ij}) = \mu + \alpha_i + \gamma x_{ij} and the variance is σ2(yij)=σ2\sigma^2(y_{ij}) = \sigma^2 40.
  • This setup fits rr parallel lines, with αi−αj\alpha_i - \alpha_j measuring treatment effects 40.
  • Covariate: A quantitative variable added to an ANOVA model to reduce unexplained variance, aiming to improve the model's explanatory power 39.
  • Model with interaction terms: To test if the covariate's effect is consistent across factor levels, a model including interaction terms is fitted: yij=μ+αi+γxij+(αγ)ixij+uijy_{ij} = \mu + \alpha_i + \gamma x_{ij} + (\alpha\gamma)_i x_{ij} + u_{ij} 40.
  • Parallel lines: The ANCOVA model with a covariate typically results in fitting parallel lines for each treatment group, assuming additive effects of treatment and covariate 40.
  • ANCOVA can significantly reduce unexplained variance when appropriate covariates are identified and used 39.
  • By accounting for a covariate, the statistical power of hypothesis tests (e.g., for treatment effects) can be substantially increased 39.
  • If blocking is not feasible, ANCOVA offers a viable alternative to reduce variability and improve the precision of estimated treatment effects 39.
  • It allows for more nuanced analysis by controlling for extraneous quantitative factors that might otherwise confound the results 39.

Examples

  • Comparing statistics teaching methods (flipped classroom, lectures, PC labs) by using previous statistics exam scores as a covariate to account for prior aptitude 39.
  • Examining starting salaries for business engineers across departments (accounting, marketing, finance) by including graduation results as a covariate for individual capacity 39.
  • Analyzing sales data for breakfast cereal advertising campaigns, using sales from the previous Saturday as a covariate to reduce unexplained variance 39.

  • Analysis of Covariance (ANCOVA) extends ANOVA by including one or more continuous variables (covariates) to explain variance in the dependent variable 41.
  • The primary goal of ANCOVA is to reduce unexplained variance (error variance) by accounting for the relationship between the covariate(s) and the dependent variable 41.
  • In ANCOVA, the covariate is treated as a nuisance factor whose effect is statistically removed to better assess the effect of the primary factor(s) 42.
  • ANCOVA assumes a linear relationship between the covariate and the dependent variable 59.
  • In regression analysis, a continuous regressor is called a covariate, while in ANOVA, a covariate is a nuisance factor controlled for 42.
  • ANCOVA aims to increase the precision of the ANOVA by reducing the error variance through the inclusion of a covariate 41.
  • This is achieved by partitioning the variance associated with the covariate from the error term, thereby isolating the variance solely attributable to the treatment effects 41.
  • When testing for interaction effects between factors (e.g., Type*Presales), if the interaction is not significant, main effects can be tested 41.
  • If an interaction is not significant, the covariate effect (e.g., Presales) can be tested by comparing a model with the covariate to one without it 41.
  • Treatment means represent the average response for each treatment group, while adjusted treatment means predict the treatment mean at the overall average of the covariate 42.
  • Adjusted treatment means are generally considered more reliable, especially when covariate values differ significantly across treatments 42.
  • The choice between ANCOVA and a blocked design depends on assumptions; ANCOVA assumes a linear relationship, while blocking does not require such an assumption 42.
  • In a two-way ANOVA with interaction, the first step is to test the interaction effect 43.
  • If the interaction term is significant in a two-way ANOVA, main effects are no longer the primary focus; instead, simple effects are tested 43.
  • If the interaction term is not significant in a two-way ANOVA, then main effects of the factors can be tested 44.
  • In unbalanced designs, Type I, II, and III sums of squares can differ, making effect disentanglement more complex 44.
  • Three-way ANOVA models include main effects, two-way interactions, and a three-way interaction term 46.
  • The significance of the three-way interaction term dictates further analysis; if negligible, two-way interactions are examined 46.
  • In models with random factor levels, the goal is to estimate the variance of the factor effects, not the individual level effects 47.
  • Random block effects introduce correlation between observations within the same block, leading to a compound symmetry structure in the covariance matrix 48.
  • Repeated measures designs, where a random block consists of a test person, are a common application of random block effects 50.
  • In repeated measures, order effects and carry-over effects are potential pitfalls that can be mitigated by randomizing the order and allowing sufficient time between measurements 50.
  • ANCOVA can increase statistical power by reducing unexplained variance, making it easier to detect significant treatment effects 41.
  • When covariate values differ across treatment groups, relying solely on unadjusted treatment means can be misleading 42.
  • Testing interaction effects is crucial in multi-way ANOVA; their significance determines whether to interpret main effects or simple effects 43.

Common pitfalls


Stochastic regressors and endogeneity

  • Regressors can be considered fixed or stochastic; their nature impacts model validity 61.
  • Endogeneity arises when a regressor is correlated with the error term, leading to biased and inconsistent OLS estimators 62.
  • OLS estimators are unbiased and consistent if regressors are exogenous (uncorrelated with residuals) 61.
  • Endogeneity occurs in dynamic models, simultaneity, omitted variable bias, and measurement error in explanatory variables 62.
  • Measurement error in an explanatory variable leads to "softening" or attenuation bias 63.
  • Instrumental Variables (IV) estimation can yield consistent estimators when endogeneity is present 63.
  • A valid instrumental variable must be uncorrelated with residuals, highly correlated with the endogenous regressor, and have no direct effect on y 63.
  • IV estimation is typically a two-stage least squares (2SLS) procedure 63.
  • The variance of IV estimators is generally larger than OLS 64.
  • The Wu-Hausman test is used to test for endogeneity, comparing OLS and IV estimators 65.
  • Exogenous regressors: corr(xj,u)=0\text{corr}(x_j, u) = 0 for all jj 61.
  • Endogenous regressor: A regressor correlated with the residuals, corr(xj,u)≠0\text{corr}(x_j, u) \neq 0 62.
  • Attenuation bias: Bias in OLS due to measurement error in explanatory variables, shrinking the estimated coefficient towards zero 63.
  • Instrumental variable (z): A variable correlated with an endogenous regressor but not with the error term 63.
  • Cointegration: A situation where two or more non-stationary time series are related such that their linear combination is stationary 71.
  • Random Effects (RE) estimation: A method for panel data assuming unobserved individual heterogeneity is uncorrelated with regressors 77.
  • Fixed Effects (FE) estimation: A method for panel data that accounts for unobserved individual heterogeneity by allowing individual-specific intercepts 75.
  • Ignoring endogeneity leads to biased and inconsistent OLS estimates 62.
  • The choice of instrumental variables significantly impacts the precision of IV estimates 64.
  • Testing for endogeneity is crucial before deciding between OLS and IV 65.
  • The Wu-Hausman test helps determine whether OLS or IV should be preferred 65.

Time series analysis

  • Stationarity is a key property of time series, meaning statistical properties are constant over time 66.
  • Non-stationary series, particularly those with unit roots, require special handling to avoid spurious regressions 67.
  • A stationary time series has a constant mean, constant variance, and autocovariance that depends only on the lag 66.
  • White noise is a stationary time series with zero mean and constant variance 66.

Panel data


Multiple logistic regression and advanced models

Multiple logistic regression

  • Extends binary logistic regression to include multiple explanatory variables 89.
  • The model is expressed as: πi=e(β0+β1xi1+...+βkxik)1+e(β0+β1xi1+...+βkxik)\pi_i = \frac{e^{(\beta_0+\beta_1x_{i1}+...+\beta_kx_{ik})}}{1+e^{(\beta_0+\beta_1x_{i1}+...+\beta_kx_{ik})}} 89.
  • The logit form is: ln⁡πi1−πi=β0+β1xi1+β2xi2+...+βkxik\ln \frac{\pi_i}{1 - \pi_i} = \beta_0 + \beta_1x_{i1} + \beta_2x_{i2} +... + \beta_kx_{ik} 89.
  • Parameters are estimated by maximizing the likelihood function with respect to β0,β1,...,βk\beta_0, \beta_1,..., \beta_k 89.
  • The null hypothesis H0:β1=β2=...=βk=0H_0: \beta_1 = \beta_2 =... = \beta_k = 0 can be tested using likelihood ratio, score, or Wald tests, all asymptotically χk2\chi^2_k distributed 89.
  • Individual parameters can be tested using the Wald test 89.
  • Interpretation of parameters uses odds ratios: eβie^{\beta_i} multiplies the odds if xix_i increases by 1 unit, holding others constant 89.
  • Example: Predicting car insurance accidents using horsepower (HP) and driver experience 89 90.
  • Finding: Experience did not significantly improve the model fit 90.
  • Example: Predicting paid employment based on child status, partner income, education, and age 90.

Models for more than two response values

  • These models extend logistic regression to situations with three or more outcome categories 91.
  • Three common models are: cumulative logit, multinomial logit, and discrete choice/conditional logit 91.

Cumulative logit model (proportional odds model)

  • Used for ordered response values (e.g., no car, one car, multiple cars) 91 92.
  • Transforms rr response values into r−1r-1 binary logit models 91.
  • Logits are defined as logitj=ln⁡P(y≤j)P(y>j)=βj0−(βj1xi1+...+βjkxik)\text{logit}_j = \ln \frac{P(y \le j)}{P(y > j)} = \beta_{j0} - (\beta_{j1}x_{i1} +... + \beta_{jk}x_{ik}) 91.
  • A key assumption is that the effect of a variable is the same for each logit (proportional odds assumption) 92.
  • This assumption can be tested with a score test 92.
  • Parameters are estimated via maximum likelihood 92.
  • Example: Predicting car insurance accident severity (no accident, small damage, large damage) based on HP and experience 92 93.
  • The proportional odds assumption held in the example (p-value for score test = 0.66) 93.

Multinomial logit model (generalized logit or baseline category logit)

  • Used when response values are not ordered 93 94.
  • Defines rr logits, but only the differences between parameters are estimable 95.
  • To resolve non-uniqueness, one category is set as the reference (e.g., βr0=βr1=...=βrk=0\beta_{r0} = \beta_{r1} =... = \beta_{rk} = 0) 95.
  • The probability is: P(yi=j)=eβj0+...+βjkxikeβ10+...+β1kxik+...+eβj0+...+βjkxik+...+1P(y_i = j) = \frac{e^{\beta_{j0} +... + \beta_{jk}x_{ik}}}{e^{\beta_{10} +... + \beta_{1k}x_{ik}} +... + e^{\beta_{j0} +... + \beta_{jk}x_{ik}} +... + 1} 95.
  • Parameters βjk\beta_{jk} are alternative specific parameters, and βj0\beta_{j0} are alternative specific constants (ASCs) 95.

Discrete choice or conditional logit model


Analysis of covariance (ANCOVA) for reducing unexplained variance

  • ANCOVA is not explicitly detailed in this section. The provided pages focus heavily on Duration Analysis, Survival Analysis, and Principal Component Analysis (PCA). There is no content within pages 101-120

Duration analysis

  • Duration analysis models the time until a specified event occurs, such as machine failure, bankruptcy, or employment .
  • It often estimates causal or predictive models where the risk of an event depends on covariates .
  • Survival data is characterized by censored data, where information is incomplete for some subjects .
  • Types of censoring include right-censored (event occurs after a certain time) and interval-censored (event occurs within an interval) .
  • A key assumption is that censoring is non-informative about the event's occurrence .
  • Standard regression models are not suitable due to time being always positive and having a skewed distribution .

Describing survival functions

  • The cumulative distribution function is F(t)=P(T≤t)F(t) = P(T \le t) .
  • The survival function S(t)=P(T>t)=1−F(t)S(t) = P(T > t) = 1 - F(t) indicates the probability of surviving past time tt .
  • The hazard function h(t)=f(t)/S(t)h(t) = f(t) / S(t) is the instantaneous rate of event occurrence given survival up to time tt .
  • The mean residual lifetime mrl(t)=E(T−t∣T>t)mrl(t) = E(T - t | T > t) is the average remaining time until the event, given survival up to time tt .
  • Percentiles (tpt_p) are times where S(tp)≤1−pS(t_p) \le 1 - p .

Nonparametric description of survival functions

  • The Kaplan-Meier Product-Limit estimator is used to visualize the survival function without assuming a theoretical distribution .
  • The estimated survival function is S^(t)=∏i:t(i)<t(1−dini)\hat{S}(t) = \prod_{i: t_{(i)} < t} (1 - \frac{d_i}{n_i}), where nin_i is the number at risk and did_i is the number of events at time t(i)t_{(i)} .
  • Output typically includes survival estimates, standard errors, number failed, and number left at risk .
  • If the last observation is censored, the survival function is undetermined thereafter .
  • Tests like the LogRank test and Wilcoxon test can compare survival curves between groups .

Parametric description of survival functions

  • Assumes a theoretical distribution (e.g., exponential, lognormal, Weibull) and estimates its parameters .
  • Exponential distribution: constant hazard rate (1/α1/\alpha), memoryless property .
  • Lognormal distribution: TT has a lognormal distribution if ln⁡(T)\ln(T) has a normal distribution .
  • Weibull distribution: characterized by a shape parameter (γ\gamma) and scale parameter (α\alpha), allowing for decreasing, increasing, or constant hazard rates .
  • For a Weibull distribution, ln⁡(T)\ln(T) follows a Gumbel distribution .
  • Goodness-of-fit for Weibull can be visually checked by plotting ln⁡(−ln⁡S(t))\ln(-\ln S(t)) against ln⁡(t)\ln(t) .
  • Maximum likelihood estimation (MLE) is used to obtain more precise parameter estimates .
  • AIC (Akaike Information Criterion) and BIC (Bayesian Information Criterion) are used for model comparison .

Accelerated Failure Time (AFT) Model

Principal Component Analysis (PCA)


Exploratory factor analysis: an introduction

  • Exploratory Factor Analysis (EFA) aims to explain the correlation structure among observed variables by identifying underlying latent dimensions .
  • It assumes correlations between observed variables can be explained by one or more unobservable factors .
  • Observed variables are represented by squares, and latent factors by circles .
  • The model for an observed variable xix_i is generally xi=λiξ+ϵix_i = \lambda_i \xi + \epsilon_i, where ξ\xi is the latent factor, λi\lambda_i is the factor loading, and ϵi\epsilon_i is the specific factor .
  • For standardized variables, E(xi)=0E(x_i)=0, var(xi)=1var(x_i)=1, E(ξ)=0E(\xi)=0, var(ξ)=1var(\xi)=1, and correlations involving specific factors are zero .
  • The total variance of an indicator can be decomposed into communality (explained variance) and specificity (unexplained variance) .
  • The correlation between two indicators xix_i and xjx_j is the product of their respective pattern loadings: corr(xi,xj)=λiλjcorr(x_i, x_j) = \lambda_i \lambda_j .
  • In a one-factor model, pattern loadings and structural loadings (correlation between indicator and factor) are identical .
  • Latent factor (ξ\xi): An unobservable construct that underlies observed variables.
  • Factor loading (λi\lambda_i): The weight or strength of the relationship between a latent factor and an observed variable. Also called pattern loading.
  • Specific factor (ϵi\epsilon_i): The variance unique to an observed variable, not explained by the common factor.
  • Communality: The proportion of variance in an observed variable that is explained by the common factor(s).
  • Specificity: The proportion of variance in an observed variable that is unique to that variable.
  • Induced correlation matrix (RiR_i): The correlation matrix predicted by the factor model, distinct from the observed correlation matrix (RobsR_{obs}) .
  • EFA seeks to explain observed correlations by identifying common factors, simplifying complex data structures.
  • The model assumes that common factors completely explain the correlation structure among indicators .
  • By adding factors, a larger portion of the correlations among indicators can be explained .
  • The interpretation of factors depends on which variables have higher communalities with them .
  • Factor analysis solutions are not unique; multiple factor models can equally explain the correlation structure .
  • Factor rotation is often used to find a factor model that is easier to interpret .
  • EFA makes assumptions about the number of factors and their relationships with observed variables without prior hypotheses .

Regression analysis

Core idea

  • Regression analysis models the relationship between a dependent variable and one or more independent variables 5.
  • The goal is to understand how changes in independent variables affect the dependent variable 6.
  • It can be used with observational or experimental data, and cross-sectional, time series, or panel data 5.

Key facts

  • The general linear model is represented as y=β0+β1x1+β2x2+...+βkxk+uy = \beta_0 + \beta_1x_1 + \beta_2x_2 +... + \beta_kx_k + u 5.
  • yy is the dependent variable, xix_i are independent variables, βi\beta_i are parameters, and uu is the error term 5.
  • Assuming errors have mean zero, the expected response is E(y)=β0+β1x1+...+βkxkE(y)= \beta_0 + \beta_1x_1 +... + \beta_kx_k 5.
  • Models must be linear in parameters, even if not linear in variables (e.g., ln⁡(y)=β0+β1x1+β2x2+β3x1x2+u\ln(y)= \beta_0 + \beta_1x_1 + \beta_2x_2 + \beta_3x_1x_2 + u) 6.
  • In matrix notation, the model is Y=Xβ+UY = X\beta + U 6.

Key concepts

  • Ordinary Least Squares (OLS): Estimators β^\hat{\beta} minimize the sum of squared residuals (Y−Xβ^)′(Y−Xβ^)(Y - X\hat{\beta})'(Y - X\hat{\beta}) 7.
  • The normal equations for OLS are X′Xβ^=X′YX'X\hat{\beta} = X'Y 7.
  • OLS estimators are derived as β^=(X′X)−1X′Y\hat{\beta} = (X'X)^{-1}X'Y if X′XX'X is invertible 7.
  • Gauss-Markov Assumptions:
  • E(ui)=0E(u_i)=0 for all ii 7.
  • var(ui)=σ2var(u_i)= \sigma^2 for all ii (homoscedasticity) 7.
  • cov(ui,uj)=0cov(u_i,u_j)=0 for i≠ji \neq j (no autocorrelation) 7.
  • Under Gauss-Markov assumptions, OLS estimators are unbiased: E(β^)=βE(\hat{\beta})= \beta 9.
  • The variance-covariance matrix of OLS estimators is cov(β^)=σ2(X′X)−1cov(\hat{\beta})=\sigma^2 (X'X)^{-1} 9.
  • OLS estimators are consistent as sample size n→∞n \to \infty 9.
  • Assumption A4: Residuals are normally distributed, ui∼Nu_i \sim N, enabling statistical inference 12.
  • Sum of Squares:
  • Total Sum of Squares (SSTOSSTO): ∑i=1n(yi−yˉ)2\sum_{i=1}^n (y_i - \bar{y})^2 13.
  • Regression Sum of Squares (SSRSSR): ∑i=1n(y^i−yˉ)2\sum_{i=1}^n (\hat{y}_i - \bar{y})^2 13.
  • Error Sum of Squares (SSESSE): ∑i=1n(yi−y^i)2=U^′U^\sum_{i=1}^n (y_i - \hat{y}_i)^2 = \hat{U}'\hat{U} 13.
  • Relationship: SSTO=SSR+SSESSTO = SSR + SSE 13.

Implications

  • OLS estimators are BLUE (Best Linear Unbiased Estimators) under the Gauss-Markov assumptions 9.

Common pitfalls


detecting and handling outliers and influential observations

Core idea

  • Outliers and influential observations can distort regression analysis results 17.
  • Handling them involves detecting, classifying, and deciding on an appropriate action 18.

Key facts

  • Extreme x-values are identified using leverage or hat values (hiih_{ii}) 18.
  • Hat values (hiih_{ii}) measure how much yiy_i influences y^i\hat{y}_i 18.
  • A common rule of thumb for extreme x-values is hii>2(k+1)nh_{ii} > \frac{2(k+1)}{n} 18.
  • Extreme y-values are assessed using deleted residuals (did_i) 18.
  • Studentized deleted residuals (di∗d^*_i) are standardized deleted residuals 19.
  • A rule of thumb for extreme y-values is ∣di∗∣>t(n−1)−(k+1)(95%)|d^*_i| > t_{(n-1)-(k+1)}(95\%) 19.
  • Influence on predicted values is measured by DFFITS (dffitsidffits_i) 19.
  • Influence on parameter estimates is measured by Cook's distance (DiD_i) 19.
  • A rule of thumb for DFFITS is ∣dffitsi∣>1|dffits_i| > 1 for small/medium nn, or ∣dffitsi∣>2k+1n|dffits_i| > 2\sqrt{\frac{k+1}{n}} for large nn 19.
  • A rule of thumb for Cook's distance is Di>Fk+1,n−k−1(0.50)D_i > F_{k+1, n-k-1}(0.50) 19.
  • The hat matrix is defined as H=X(X′X)−1X′H = X(X'X)^{-1}X' 18.

Key concepts

  • Leverage: Measures the extremity of an observation's predictor variable values 18.
  • Outlier: An observation with an extreme response value 17 18.
  • Influential observation: An observation that significantly affects the regression model's results 17.
  • Hat-value (hiih_{ii}): A measure of leverage for the ii-th observation 18.
  • Deleted residuals: Residuals computed after removing an observation 18.
  • Studentized deleted residuals: Standardized deleted residuals, approximating a t-distribution 19.
  • DFFITS: Measures the change in the fitted value for an observation due to its inclusion 19.
  • Cook's distance: Measures the overall influence of an observation on all parameter estimates 19.

Implications

  • Outliers can arise from typos or genuine extreme values 18.
  • Correcting typos is essential if identified 18.
  • Non-influential outliers can often be ignored 18.
  • Influential observations may require alternative analyses or reporting results with and without them 18.

Interactions and multicollinearity in regression

Core idea

  • Interactions model how the effect of one predictor changes based on the level of another predictor.
  • Multicollinearity occurs when predictor variables are highly correlated, making it difficult to isolate their individual effects.

Key facts

  • Indicator (dummy) variables are used to represent categorical information in regression models 20.
  • Dummy coding uses cc indicator variables for cc categories, with one category typically set as the reference 20.
  • Effect coding (sum coding) uses c−1c-1 indicators with an extra constraint that the sum of parameters across categories is zero 22.
  • Interactions are modeled by including products of predictor variables (e.g., x×dx \times d) in the regression equation 23.
  • The interpretation of parameters changes significantly with the choice of coding, especially in models with interactions 23.
  • Type II Sum of Squares (SS) are preferred for testing main effects when interactions are not significant 22.
  • Multicollinearity arises from overlapping information among correlated predictors, hindering individual effect estimation 25.
  • Interactions require both predictor and response variables for analysis, unlike multicollinearity which only needs predictors 25.
  • The Chow test uses interaction terms to test if a single model is valid across two groups or periods 24.
  • Piecewise linear regression uses an interaction term with a dummy variable to model different linear relationships at a specific point 25.

Key concepts

  • Dummy coding: Creates cc variables for cc categories, setting one as a reference category 20.
  • Interpretation: Coefficients represent the difference compared to the reference category 20.
  • Effect coding (Sum coding): Uses c−1c-1 indicators and constrains the sum of parameters to zero 22.
  • Interpretation: Coefficients represent the deviation from the average effect across all categories 22.
  • Interaction Term: A variable representing the joint effect of two or more predictors, typically the product of their values (x×dx \times d) 23.
  • Interpretation: Indicates if the effect of one predictor depends on the level of another 23.
  • Multicollinearity: High correlation between predictor variables 25.
  • Consequence: Inflated standard errors, unstable coefficient estimates 25.
  • Type II SS: Test for the effect of a predictor given other lower-order terms, but not higher-order terms (like interactions) 22.
  • Advantage: Useful when interactions are non-significant, tests main effects without correcting for insignificant interactions 22.
  • Type III SS: Test for the unique effect of a predictor given all other predictors in the model 24.
  • Difference: Sensitive to the coding scheme in interaction models due to changing correlations 24.

Implications

  • The choice of categorical variable coding affects parameter interpretation and Type III SS, especially with interactions 23.

Common pitfalls


Post hoc analysis and multiple comparison procedures in ANOVA

Core idea

  • If the overall F-test in ANOVA shows significant differences between group means, post hoc analyses are used to identify which specific groups differ 32.
  • These procedures help avoid inflating the Type I error rate when conducting multiple pairwise comparisons.

Key facts

  • A contrast is a linear combination of group means with coefficients summing to zero, used to test specific hypotheses 32.
  • Testing multiple contrasts inflates the overall Type I error rate (alpha inflation or multiple testing problem) 33.
  • The probability of rejecting at least one null hypothesis incorrectly when testing kk contrasts is 1−(1−α)k1 - (1 - \alpha)^k 33.
  • Data snooping, where comparisons are suggested by the data, invalidates classical statistical tests 33.
  • The studentized range distribution, Qr,n−rQ_{r,n-r}, is used in some multiple comparison procedures 33.

Key concepts

  • Contrasts: Test specific linear combinations of means, e.g., ∑i=1rciμi=0\sum_{i=1}^r c_i \mu_i = 0 where ∑i=1rci=0\sum_{i=1}^r c_i = 0 32.
  • Alpha Inflation: The increased probability of making at least one Type I error when performing multiple statistical tests simultaneously 33.
  • Data Snooping: Invalidating statistical tests by selecting comparisons based on preliminary data inspection 33.
  • Tukey's Honestly Significant Difference (HSD) method: A procedure for all pairwise comparisons using the studentized range distribution 34.
  • Bonferroni method: A conservative approach where individual comparison significance levels are adjusted (α/m\alpha / m) to control the family-wise error rate 34.

Implications

  • Post hoc tests are crucial for pinpointing specific group differences after a significant ANOVA result 32.
  • Using unadjusted tests for multiple comparisons leads to an unacceptably high chance of false positives 33.
  • Properly controlled multiple comparison procedures ensure a desired overall confidence level for all comparisons 34.
  • Tukey's HSD provides simultaneous confidence intervals for all pairwise mean differences 34.
  • The Bonferroni method is generally more conservative (larger intervals) than Tukey's HSD for all pairwise comparisons 35.

Common pitfalls

  • Performing multiple t-tests without adjustment for the increased chance of Type I error 33.
  • Relying on comparisons suggested by looking at the raw data before formal testing 33.
  • Assuming that individual p-values from multiple tests are valid for the overall experiment 33.

Implementing blocked experiments to reduce residual variance

Core idea

  • Goal is to reduce residual variance and increase conclusion validity by grouping experimental units into homogeneous blocks 35 36.
  • Treatments are assigned randomly within each block.
  • This is similar to Analysis of Covariance (ANCOVA) in its goal to improve ANOVA power 39.

Key facts

  • Blocking involves grouping subjects (experimental units) into homogeneous groups based on characteristics like age or education 35 36.
  • Treatments are then randomly assigned within these blocks 35.
  • The model for a blocked experiment with rr treatments and ss blocks is yij=μ+αi+βj+uijy_{ij} = \mu + \alpha_i + \beta_j + u_{ij} 36.
  • μ\mu is the intercept, αi\alpha_i is the treatment effect, βj\beta_j is the block effect, and uiju_{ij} are residuals ~ N(0, σ2\sigma^2) 36.
  • The usefulness of blocking is tested by comparing the full model to a reduced model without the blocking effect 39.
  • Blocking assumes additive effects of treatment and block, meaning no interaction between them 44.
  • In a balanced design with sum or effects coding, SS(A) and SS(B) do not overlap 45.

Key concepts

  • Objective: To reduce unexplained variation (residual variance) and thus increase the statistical power of tests by accounting for known sources of variability 35.
  • Model structure: Incorporates both treatment effects (αi\alpha_i) and block effects (βj\beta_j) 36.
  • Hypothesis testing for treatment effect: H0:α1=...=αrH_0: \alpha_1 =... = \alpha_r vs. Ha:H_a: not H0H_0. Tested by comparing SSE of the full model with a reduced model excluding treatment effects 38.
  • Hypothesis testing for block effect: H0:β1=...=βsH_0: \beta_1 =... = \beta_s vs. Ha:H_a: not H0H_0. Tested by comparing SSE of the full model with a reduced model excluding block effects 39.
  • Additive model assumption: Assumes no interaction between treatment and block effects. This can be visually checked by parallel lines in cell mean plots 44.

Implications

  • Blocking is beneficial when individual variation among experimental units is large compared to treatment effects 36.
  • It leads to more precise estimates of treatment effects.
  • When blocking is impossible, Analysis of Covariance (ANCOVA) can be used as an alternative to reduce unexplained variance 39.
  • Blocking has advantages over ANCOVA: no assumption on the linear relationship between blocking variable and response, and independent estimation of treatment and blocking effects 42.

Common pitfalls

  • Assuming additivity of treatment and block effects when an interaction exists 44.
  • Using blocking when the blocking variable is influenced by the treatments (which is not a covariate issue in ANCOVA but relevant for blocking variable selection) 45.

Introduction to econometrics and model misspecification

Core idea

  • Econometrics applies statistical methods to economic data, primarily using multiple linear regression 52.
  • The focus is on unbiasedness, efficiency, and consistency of estimators due to policy recommendation implications 52.
  • Model misspecification refers to errors in model building, such as including irrelevant variables or omitting relevant ones 52 53.

Key facts

  • Including irrelevant variables leads to unbiased and consistent estimators but reduced precision, unless they are uncorrelated with relevant variables 53.
  • Omitting relevant variables generally leads to biased estimators, particularly the intercept, unless omitted variables are uncorrelated with included ones 53.
  • Omitted variable bias occurs when a variable correlated with both an included regressor and the dependent variable is left out 53.
  • A positive correlation between an omitted variable and an included regressor, with a positive coefficient for the omitted variable, results in upward bias 53.
  • The variance of OLS estimators in a model with irrelevant variables is calculated as var(b1)=σ2/∑(xi1−xˉ1)2×1/(1−corr2(x1,x2))\text{var}(b_1) = \sigma^2 / \sum (x_{i1} - \bar{x}_1)^2 \times 1/(1 - \text{corr}^2(x_1, x_2)) 53.
  • Logarithmic transformations can linearize non-linear relationships for estimation 54.
  • Comparing R-squared values between models with transformed response variables requires fitting the transformed model and computing correlations with the original variables' transformations 54.

Key concepts

  • Irrelevant variables: Variables included in a model that have a true coefficient of zero 52.
  • Omitted variable bias: Bias in regression estimates caused by excluding relevant variables from the model 53.
  • Linear relationship: y^=a+bx\hat{y} = a + bx 54.
  • Logarithmic relationship: y^=a+bln⁡x\hat{y} = a + b \ln x 54.
  • Exponential/Log-linear relationship: ln⁡y^=a+bx\ln \hat{y} = a + bx or y^=cdx\hat{y} = c d^x 54.
  • Power/Multiplicative relationship: ln⁡y^=a+bln⁡x\ln \hat{y} = a + b \ln x or y^=cxb\hat{y} = c x^b 54.
  • Stationarity (time series): A time series is stationary if its mean, variance, and autocovariance are constant over time 66.

Implications

  • Model misspecification can lead to inefficient or biased parameter estimates, impacting policy recommendations 52 53.
  • Correct model specification is crucial for obtaining reliable and accurate econometric results 52 53.
  • Logarithmic transformations can help model non-linear effects, but direct comparison of R-squared across different functional forms is not valid 54.

Common pitfalls

  • Assuming a linear relationship when the true relationship is non-linear 54.
  • Misinterpreting R-squared values when comparing models with different dependent variables (e.g., yy vs. ln⁡y\ln y) 54.
  • Underestimating the impact of omitting relevant variables on parameter estimates 53.

Endogeneity and instrumental variables estimation

Core idea

  • Endogeneity occurs when a regressor is correlated with the error term, violating a key OLS assumption 62.
  • Instrumental variables (IV) estimation provides a method to obtain consistent estimators in the presence of endogeneity 63.

Key facts

  • Endogeneity arises from dynamic models with autocorrelated residuals, simultaneity, omitted variables, and measurement error in explanatory variables 62.
  • An endogenous regressor leads to biased and inconsistent OLS estimators 62.
  • A variable zz is a valid instrumental variable for xjx_j if it's uncorrelated with residuals (corr(z,u)=0corr(z, u) = 0) 63.
  • A valid instrument must also be highly correlated with the endogenous regressor (corr(z,xj)>0corr(z, x_j) > 0) 63.
  • Instruments should not have a direct effect on the dependent variable 63.
  • IV estimation is typically a two-step procedure known as two-stage least squares (2SLS) 63.
  • The standard deviation of IV estimators needs adjustment to account for uncertainty in predicted values 64.
  • IV estimators are consistent but generally less efficient (have larger variance) than OLS estimators 64 65.
  • The Wu-Hausman test can be used to test for endogeneity by comparing OLS and IV estimators 65.

Key concepts

  • Exogenous regressors: Regressors uncorrelated with the error term (corr(xj,u)=0corr(x_j, u) = 0). OLS is valid when all regressors are exogenous 61.
  • Endogenous regressor: A regressor correlated with the error term (corr(xj,u)≠0corr(x_j, u) \neq 0) 62.
  • Simultaneity: A situation where variables influence each other (e.g., demand and price) 62.
  • Omitted variable bias: Bias introduced when a relevant variable correlated with both the included regressor and the dependent variable is excluded from the model 62.
  • Measurement error bias (attenuation bias): Bias occurring when an explanatory variable is measured with error, leading to an estimated coefficient closer to zero 63.
  • Instrumental Variable (IV): A variable that is correlated with an endogenous regressor but uncorrelated with the error term 63.
  • Two-Stage Least Squares (2SLS): The standard method for IV estimation, involving regressing endogenous variables on instruments and then using predicted values in the main equation 63.

Implications

  • Endogeneity invalidates the unbiasedness and consistency of OLS estimators 62.
  • The presence of endogeneity necessitates the use of alternative estimation methods like IV 63.
  • The efficiency loss in IV estimation means OLS should be preferred if endogeneity is absent 65.
  • The choice of instruments is crucial for valid IV estimation and impacts the precision of the estimates 63 64.
  • The Wu-Hausman test helps decide whether to use OLS or IV estimators 65.

Common pitfalls

  • Incorrectly identifying or finding valid instrumental variables can lead to biased results 63.
  • The Wu-Hausman test's outcome depends on the specific instruments chosen 65.

Time series stationarity and unit root testing

Core idea

  • A time series yty_t is stationary if its statistical properties (mean, variance, autocovariance) are constant over time 66.
  • Stationarity is crucial for reliable time series modeling and inference 66.
  • Non-stationary series often require transformations (like differencing) or specialized modeling techniques 66.
  • Unit root nonstationarity is a common and important type of nonstationarity 67.

Key facts

  • Mean stationary: E(yt)=μE(y_t) = \mu for all tt 66.
  • Variance stationary: var(yt)=σ2var(y_t) = \sigma^2 (finite and constant) for all tt 66.
  • Covariance stationary: cov(yt,yt−s)=γscov(y_t, y_{t-s}) = \gamma_s (depends only on lag ss, not tt) 66.
  • A time series is fully stationary if it is mean, variance, and covariance stationary 66.
  • White noise (utu_t i.i.d. with mean 0, variance σ2\sigma^2) is stationary 66.
  • A random walk (yt=yt−1+uty_t = y_{t-1} + u_t) is nonstationary, but its first difference (Δyt\Delta y_t) is stationary 66.
  • Series that become stationary after first differencing are called difference stationary or integrated of order 1 (I ) 1 66.
  • A series is I(m) if it requires mm differencing steps to become stationary 66.
  • An AR model (yt=α+φyt−1+uty_t = \alpha + \varphi y_{t-1} + u_t) is stationary if ∣φ∣<1|\varphi| < 1 1 67.
  • Deterministic trends (yt=α+βt+uty_t = \alpha + \beta t + u_t) result in trend stationary series 67.

Key concepts

  • Stationarity: Statistical properties (mean, variance, autocovariance) do not change over time 66.
  • White noise: A fundamental stationary process with zero mean, constant variance, and zero autocovariance at all lags 66.
  • Random walk: A nonstationary process where the current value is the previous value plus a shock 66.
  • I series: A series that requires one round of differencing to achieve stationarity 1 66.
  • Trend stationary: A series that is stationary after removing a deterministic trend 67.
  • Unit root nonstationarity: Occurs in AR models when φ=1\varphi = 1, leading to a stochastic trend 1 67.
  • Testing for a unit root involves checking if φ=1\varphi = 1 in an AR model, often by testing Φ=0\Phi = 0 in Δyt=α+Φyt−1+ut\Delta y_t = \alpha + \Phi y_{t-1} + u_t 1 67.

Unit root testing

  • Testing for Φ=0\Phi=0 in Δyt=α+Φyt−1+ut\Delta y_t = \alpha + \Phi y_{t-1} + u_t is equivalent to testing φ=1\varphi=1 in yt=α+φyt−1+uty_t = \alpha + \varphi y_{t-1} + u_t 67.
  • The null hypothesis for a unit root is H0:Φ=0H_0: \Phi = 0 67.
  • The standard t-test statistic is used, but it is not t-distributed under H0H_0 for unit root tests 67.
  • The test statistic for Φ\Phi follows a distribution called the τ\tau-test statistic, which depends on the presence of an intercept and trend 69.

Implications


Panel data estimation methods: OLS, random effects, and fixed effects

Core idea

  • Panel data models involve observations for multiple individuals (ii) over multiple time periods (TT), represented as yit=α+βxit+uity_{it} = \alpha + \beta x_{it} + u_{it} 72.
  • The error term uitu_{it} can be decomposed into a time-invariant unobserved heterogeneity component (νi\nu_i) and an idiosyncratic error (ϵit\epsilon_{it}), uit=νi+ϵitu_{it} = \nu_i + \epsilon_{it} 73.
  • The choice of estimation method depends on whether the unobserved heterogeneity (νi\nu_i) is correlated with the regressors (xitx_{it}) 74.

Key facts

  • The standard OLS estimator in a panel data setting with uit=νi+ϵitu_{it} = \nu_i + \epsilon_{it} is unbiased and consistent if corr(xit,νi)=0\text{corr}(x_{it}, \nu_i) = 0, but not BLUE, and standard errors are incorrect 76 77.
  • If corr(xit,νi)=0\text{corr}(x_{it}, \nu_i) = 0, OLS with cluster-corrected standard errors can be used, but it is less efficient than Random Effects 76 77.
  • Random Effects (RE) estimation uses Feasible Generalized Least Squares (FGLS) by transforming variables to account for the structure of the error term, yielding BLUE estimators if exogeneity holds 77 78.
  • The transformation for RE involves yit∗=yit−ρyˉi.y^*_{it} = y_{it} - \rho \bar{y}_{i.}, where ρ=1−σϵ2Tσν2+σϵ2\rho = 1 - \sqrt{\frac{\sigma^2_\epsilon}{T\sigma^2_\nu + \sigma^2_\epsilon}} 77.
  • Fixed Effects (FE) estimation, also known as individual effects or within-group estimation, addresses endogeneity by removing the unobserved heterogeneity νi\nu_i 74 75.
  • FE can be implemented by either including individual-specific intercepts or by using time-demeaned variables (yit∗=yit−yˉi.y^*_{it} = y_{it} - \bar{y}_{i.}) 75 83.
  • FE estimators are consistent for time-varying regressors even if corr(xit,νi)≠0\text{corr}(x_{it}, \nu_i) \neq 0 75 82.
  • Variables that are constant over time for each individual cannot be estimated in a Fixed Effects model 75 85.
  • The Hausman test is used to formally test the null hypothesis of exogeneity (corr(νi,xit)=0\text{corr}(\nu_i, x_{it})=0) 77 91.

Key concepts

  • Unobserved Heterogeneity (νi\nu_i): Time-invariant unobserved characteristics of individuals that can be correlated with regressors.
  • Idiosyncratic Error (ϵit\epsilon_{it}): Time-varying error component independent across individuals and time.
  • Pooled OLS: Ignores the panel structure, treating all observations as independent. Leads to biased and inconsistent estimates if unobserved heterogeneity is present and correlated with regressors 85.
  • Random Effects (RE) Estimator: Assumes νi\nu_i are random and uncorrelated with regressors. More efficient than OLS with corrected standard errors when exogeneity holds 77 78.
  • Fixed Effects (FE) Estimator: Treats νi\nu_i as fixed parameters to be estimated or eliminated. Robust to endogeneity but cannot estimate time-invariant regressors 74 75.
  • Within-Group Estimator: Mathematically equivalent to FE estimation by demeaning the data 75 83.
  • Hausman Test: Compares coefficients from RE and FE estimators. If they are not significantly different, RE is preferred for efficiency; if significantly different, FE is preferred due to endogeneity 77

Implications

  • When corr(xit,νi)=0\text{corr}(x_{it}, \nu_i) = 0, RE is more efficient than FE and can estimate time-invariant regressors 77 91.
  • If corr(xit,νi)≠0\text{corr}(x_{it}, \nu_i) \neq 0, FE is the preferred consistent estimator, though it cannot estimate time-invariant variables 74 75 82.
  • Using pooled OLS when individual effects exist and are correlated with regressors leads to omitted variable bias 85.
  • The choice between FE and RE is critical for obtaining unbiased and consistent parameter estimates.

Common pitfalls

  • Applying standard OLS without accounting for the panel structure can lead to incorrect standard errors and potentially biased estimates 76 77.
  • Failing to consider the correlation between regressors and unobserved heterogeneity leads to inconsistent FE estimates 74 82.

Introduction to logistic regression

Core idea

  • Logistic regression models a binary outcome (0 or 1) using covariates 78.
  • It predicts the probability of an event occurring based on predictor variables 78.
  • The model uses the logistic distribution function to ensure probabilities are between 0 and 1 80.

Key facts

  • The linear probability model (yi=β0+β1xi1+uiy_i = \beta_0 + \beta_1 x_{i1} + u_i) predicts E(yi)=β0+β1xi1E(y_i) = \beta_0 + \beta_1 x_{i1} 78.
  • Drawbacks of the linear probability model include predicted probabilities outside 0-1 range and heteroscedasticity 80.
  • Simple logistic regression defines probability as πi=11+e−(β0+β1xi1)\pi_i = \frac{1}{1 + e^{-(\beta_0 + \beta_1 x_{i1})}} 80.
  • The odds are defined as πi1−πi\frac{\pi_i}{1 - \pi_i} 80.
  • The logit is the natural logarithm of the odds: ln(πi1−πi)=β0+β1xi1ln(\frac{\pi_i}{1 - \pi_i}) = \beta_0 + \beta_1 x_{i1} 80.
  • Maximum Likelihood Estimation (MLE) is used to estimate parameters because Ordinary Least Squares (OLS) estimators have issues with non-grouped data 82.

Key concepts

  • Odds Ratio: Measures the change in odds for a one-unit increase in a covariate 82.
  • Odds ratio is eβ1e^{\beta_1} 82.
  • If eβ1>1e^{\beta_1} > 1, odds increase; if eβ1<1e^{\beta_1} < 1, odds decrease 82.
  • Logit: The transformation of probability to the log-odds scale, which is linear in covariates 80.
  • Maximum Likelihood Estimation (MLE): A method to find parameters that maximize the probability of observing the given data 82.
  • Perfect Separation: Occurs when all low covariate values have a response of 0 and all high values have a response of 1, leading to infinite parameter estimates 82.

Implications

  • Logistic regression provides a more realistic model than the linear probability model by constraining predictions between 0 and 1 80.
  • The S-shaped curve of logistic regression is more realistic for modeling probabilities 80.
  • The odds ratio provides a more interpretable measure of covariate effects than directly interpreting β1\beta_1 on probability 82.
  • MLE addresses the limitations of OLS in the context of binary outcomes and heteroscedasticity 82.
  • Awareness of perfect separation is crucial for avoiding estimation issues 82.

Multiple logistic regression with several explanatory variables

Core idea

  • Extends binary logistic regression to include multiple explanatory variables 89.
  • Allows for modeling of the probability of a binary outcome based on a combination of predictors 89.

Key facts

  • The model for the probability πi\pi_i is given by πi=e(β0+β1xi1+⋯+βkxik)1+e(β0+β1xi1+⋯+βkxik)\pi_i = \frac{e^{(\beta_0 + \beta_1 x_{i1} + \dots + \beta_k x_{ik})}}{1 + e^{(\beta_0 + \beta_1 x_{i1} + \dots + \beta_k x_{ik})}} 89.
  • The logit of the probability is linear in the predictors: ln⁡(πi1−πi)=β0+β1xi1+⋯+βkxik\ln\left(\frac{\pi_i}{1 - \pi_i}\right) = \beta_0 + \beta_1 x_{i1} + \dots + \beta_k x_{ik} 89.
  • The likelihood function L=∏i=1nπiyi(1−πi)1−yiL = \prod_{i=1}^{n} \pi_i^{y_i} (1 - \pi_i)^{1-y_i} is maximized with respect to β0,β1,…,βk\beta_0, \beta_1, \dots, \beta_k 89.
  • Global null hypothesis H0:β1=⋯=βk=0H_0: \beta_1 = \dots = \beta_k = 0 can be tested using Likelihood Ratio, Score, or Wald tests 89 90.
  • Individual parameters βj\beta_j can be tested using the Wald test 89.
  • The odds ratio for βj\beta_j is eβje^{\beta_j}, representing the multiplicative change in odds for a one-unit increase in xjx_j while other variables are constant 89 90.
  • Model fit statistics like AIC and BIC are used to compare models 89 90.

Key concepts

  • Interpretation of parameters: eβje^{\beta_j} represents the factor by which the odds of the event change for a one-unit increase in predictor xjx_j, holding other predictors constant 89 90.
  • Likelihood Ratio Test: Compares the likelihood of the full model to a null model with only an intercept 89 90.
  • Wald Test: Tests the significance of individual regression coefficients 85 89.
  • Score Test: Another method to test hypotheses about model parameters 85 89.

Implications

  • Allows for more complex relationships to be modeled than with a single predictor 89.
  • Improved prediction accuracy by incorporating multiple relevant factors 90.
  • Provides insights into the independent effect of each variable on the outcome 89 90.

Common pitfalls

  • Multicollinearity: High correlation between explanatory variables can inflate standard errors and make parameter estimates unstable. [Implicit in the need for careful model building
  • Model misspecification: Incorrectly assuming a linear relationship on the logit scale or omitting important variables. [Implicit in model fitting

Nonparametric description of survival functions using Kaplan-Meier

Core idea

  • Survival analysis models the time until an event occurs .
  • The Kaplan-Meier estimator is a nonparametric method to visualize the survival function without assuming a theoretical distribution .
  • Survival data often includes censored observations, where the exact event time is unknown .

Key facts

  • The survival function, S(t)S(t), is the probability that a subject survives past time tt .
  • S(t)S(t) is non-increasing, S=1S =1, and S(∞)=0S(\infty)=0 (in most cases) .
  • The Kaplan-Meier estimator formula is S^(t)=∏i:t(i)<t(1−dini)\hat{S}(t) = \prod_{i:t_{(i)}<t} (1 - \frac{d_i}{n_i}) .
  • nin_i is the number at risk just before time t(i)t_{(i)}, and did_i is the number of events at t(i)t_{(i)} .
  • Censored observations are marked with an asterisk (*) in output tables .
  • When the last observation is censored, the survival function is undetermined after that time .
  • The mean residual lifetime (mrl) at time 0 estimates the mean time until the event .
  • Mean survival time can be underestimated if the largest observation is censored .

Key concepts

  • Censoring: Information about a subject's event time is incomplete (e.g., still alive at study end) .
  • Non-informative censoring: Censoring is not related to the impending event .
  • Survival function (S(t)S(t)): Probability of surviving beyond time tt .
  • Cumulative distribution function (F(t)F(t)): Probability of the event occurring at or before time tt (F(t)=1−S(t)F(t) = 1 - S(t)) .
  • Hazard function (h(t)h(t)): Instantaneous rate of event occurrence given survival up to time tt (h(t)=f(t)/S(t)h(t) = f(t)/S(t)) .
  • Mean residual lifetime (mrl): Expected remaining time until the event, given survival past time tt .
  • Percentiles: Time points at which a certain proportion of subjects have experienced the event (e.g., median is the 50th percentile) .

Implications

  • The Kaplan-Meier estimator allows for visual comparison of survival curves between different groups .
  • Statistical tests like the Log-Rank and Wilcoxon tests can assess homogeneity of survival curves between strata .
  • Rejecting the null hypothesis of equal survival curves indicates a significant difference .
  • Tip: When interpreting survival functions, pay attention to the number of individuals at risk (nin_i) as it influences the uncertainty of the estimates

  • Tip: The difference in mean survival time between groups can be significant for decision-making, but always consider the associated confidence intervals


Accelerated failure time (AFT) and loglinear models

Core idea

  • AFT models, also called loglinear models, can incorporate explanatory variables by modeling the logarithm of the survival time .
  • The effect of covariates in AFT models is to rescale the time axis, accelerating or decelerating the event occurrence .

Key facts

  • The AFT model assumes ln(T)=β0+β1x1+⋯+βkxk+σϵln(T) = \beta_0 + \beta_1x_1 + \dots + \beta_kx_k + \sigma\epsilon, where ϵ\epsilon follows a specified distribution .
  • This can be rewritten as T=eβ0+σϵeβ1x1+⋯+βkxkT = e^{\beta_0 + \sigma\epsilon} e^{\beta_1x_1 + \dots + \beta_kx_k} .
  • Covariate effects e−∑βixie^{-\sum \beta_ix_i} accelerate time if >1> 1 and extend time if <1< 1 .
  • Parameters are estimated using maximum likelihood .
  • Residuals are often assumed to be normally distributed (lognormal survival) or Gumbel distributed (Weibull survival) .
  • In the Weibull AFT model, percentiles tpt_p are computed as tp=α^(−ln⁡(1−p))1/s^t_p = \hat{\alpha}(-\ln(1-p))^{1/\hat{s}} where α^=eμ^\hat{\alpha} = e^{\hat{\mu}} and s^\hat{s} is the Weibull shape parameter .
  • In the lognormal AFT model, percentiles tpt_p are computed as tp=eμ+σzpt_p = e^{\mu + \sigma z_p}, where zpz_p is the quantile of the standard normal distribution .

Key concepts

  • Loglinear model: A model where the logarithm of the dependent variable is linearly related to the predictors .
  • Time acceleration/deceleration: Covariates change the timescale; a factor greater than 1 accelerates, less than 1 decelerates .
  • Baseline survival function S0(t)S_0(t): The survival function when all covariates are zero .
  • Covariate effect on survival function: Sx(t)=S0(te−∑βixi)S_x(t) = S_0(t e^{-\sum \beta_ix_i}) .
  • Parameter estimation: Standard maximum likelihood estimation is used .
  • Model comparison: AIC and BIC can compare fits of different AFT models or distributions .
  • AIC=−2ln⁡L+2(p+k)AIC = -2\ln L + 2(p+k)
  • BIC=−2ln⁡L+(p+k)ln⁡(n)BIC = -2\ln L + (p+k)\ln(n)
  • pp = number of covariates, kk = number of distribution parameters.

Implications

  • Attending a re-orientation course (course=1) significantly decreases time to employment (e−0.2527≈0.78e^{-0.2527} \approx 0.78) .
  • In one example, attending a course decreased time to employment by 22% .
  • In another example, attending a course decreased time to employment by 25% .
  • The lognormal model provided a slightly better fit (lower AIC) than the Weibull model in one analysis .
  • Tip: When comparing models, always ensure they are fitted to the same data subset and use consistent fit statistics like AIC or BIC


Principal component analysis (PCA)

Core idea

  • PCA constructs new variables (principal components, PCs) that are linear combinations of original variables .
  • PCs capture the maximum information in successive components, are uncorrelated, and their number equals the original variables .
  • PCA is most effective when original variables are highly correlated and can be summarized with fewer dimensions without significant information loss .

Key facts

  • PCA requires numerical data .
  • Data must be either mean-corrected (centered) or standardized before PCA .
  • Mean-corrected data has a mean of 0; standardized data has a mean of 0 and a standard deviation of 1 .
  • The sample covariance matrix (S) is used for mean-corrected data; the correlation matrix (R) is used for standardized data .
  • The sum of variances of PCs equals the total variance of the original variables .
  • Eigenvalues (λi\lambda_i) represent the variance captured by each corresponding principal component .
  • Eigenvectors (eje_j) define the direction of the principal components .

Key concepts

  • Principal Components (PCj): Linear combinations of original variables x1,...,xkx_1,..., x_k, defined as PCj=ej′x=xj′ePC_j = e'_j x = x'_j e, where eje_j is the eigenvector of the covariance matrix Σ\Sigma .
  • Variance of PCs: var(PCj)=λjvar(PC_j) = \lambda_j, where λj\lambda_j is the eigenvalue corresponding to eje_j .
  • Uncorrelated PCs: cov(PCi,PCj)=0cov(PC_i, PC_j) = 0 for i≠ji \neq j .
  • Maximizing Variance: The first principal component (PC1PC_1) is the linear combination that maximizes variance, subject to c′c=1c'c = 1 .
  • Lagrange Multiplier: Used to maximize c′Σcc' \Sigma c subject to the constraint c′c=1c'c = 1, leading to the eigenvalue problem (Σ−λI)c=0(\Sigma - \lambda I)c = 0 .
  • Reconstruction: The original covariance matrix can be reconstructed from eigenvalues and eigenvectors: Σ=∑j=1kλjejej′\Sigma = \sum_{j=1}^k \lambda_j e_j e'_j .

Implications

  • PCA can reduce dimensionality by representing data with fewer, uncorrelated components .
  • It helps identify underlying structures and relationships in correlated variables .
  • The proportion of total variance explained by each PC indicates its importance .
  • Large eigenvalues indicate components that capture significant information .

Example

  • Example: For weight and height, PCA can create a 'figure' component, summarizing most information in one variable

  • For uncorrelated variables like weight and income, PCA might not reduce dimensions effectively without losing substantial information
  • Example: Given a covariance matrix S, eigenvalues are found by solving det⁡(S−λI)=0\det(S - \lambda I) = 0

  • For $S = \begin{pmatrix} 23
  • 09 & 16

Application and interpretation of principal component analysis results

Core idea

  • Principal components (PCs) are linear combinations of original variables, ordered by the variance they explain .
  • The first PC captures the most variance, and subsequent PCs capture the remaining variance while being uncorrelated to previous ones .
  • The sum of variances of all PCs equals the total variance of the original variables .

Key facts

  • Eigenvalues (λi\lambda_i) represent the variance explained by each corresponding eigenvector (PC) .
  • Eigenvectors (eje_j) define the direction and weights of the principal components .
  • The total variance is the sum of eigenvalues, which also equals the trace of the covariance matrix .
  • PC scores are the values of the new variables for each observation .
  • Pattern loadings (eigenvectors) define the principal components .
  • Structural loadings (correlations between PCs and original variables) help interpret PCs .

Key concepts

  • Eigenvalue calculation: Derived from the determinant of the covariance matrix minus λI\lambda I, set to zero .
  • Example: For matrix S=(23.0916.4516.4521.09)S = \begin{pmatrix} 23.09 & 16.45 \\ 16.45 & 21.09 \end{pmatrix}, eigenvalues are λ1=38.57\lambda_1 = 38.57 and λ2=5.61\lambda_2 = 5.61 .
  • Eigenvector calculation: Solved using the covariance matrix and calculated eigenvalues .
  • Example: For λ1=38.57\lambda_1 = 38.57, eigenvector e1=(0.728,0.685)′e_1 = (0.728, 0.685)' .
  • PC score calculation: Mean-corrected data multiplied by eigenvectors .
  • PC1=0.728(x1−xˉ1)+0.685(x2−xˉ2)PC_1 = 0.728(x_1 - \bar{x}_1) + 0.685(x_2 - \bar{x}_2) .
  • Structural loadings: Correlation between an original variable and a principal component .
  • Useful for interpreting and labeling PCs .
  • A common cutoff for absolute structural loadings is 0.5 .
  • Geometrical interpretation: Points with the same density in a multivariate normal distribution lie on an ellipsoid with axes along eigenvectors and lengths related to eigenvalues .

Implications

  • The proportion of variance explained by each PC indicates its importance .
  • Standardization of data is crucial if variables are on different scales and equally important .
  • PC analysis on mean-corrected data is scale-dependent; use standardized data unless original variances are intrinsically informative .
  • Choosing the number of PCs to retain involves methods like scree plots or Horn's Parallel procedure .
  • A scree plot helps identify the "elbow" where eigenvalues significantly decrease, suggesting a cutoff for PCs .
  • Retaining PCs with eigenvalues greater than one is a common rule of thumb for standardized data .

Exploratory factor analysis methodology and application

Core idea

  • Exploratory factor analysis (EFA) aims to explain the correlation structure among observed variables by identifying underlying latent dimensions 16.
  • It seeks to find latent factors that can explain observed correlations without prior assumptions on the number of factors or their relations to observed variables 16.

Key facts

  • In EFA, observed variables (xix_i) are modeled as a linear combination of latent factors (ξj\xi_j) plus a unique error term (ϵi\epsilon_i) 18.
  • The general model is xi=∑j=1mλijξj+ϵix_i = \sum_{j=1}^m \lambda_{ij}\xi_j + \epsilon_i, where λij\lambda_{ij} are factor loadings 18.
  • Under standardized assumptions with uncorrelated factors, the correlation matrix RR is modeled as R=ΛΛ′+ΨR = \Lambda\Lambda' + \Psi, where Λ\Lambda contains loadings and Ψ\Psi is a diagonal matrix of specific variances 19 20.
  • The implied correlation matrix (RiR_i) from the model should approximate the observed correlation matrix (RobsR_{obs}) 15 30.
  • Principal Component Analysis (PCA) can be used as a method to obtain an initial factor model by using eigenvectors and eigenvalues of the correlation matrix 22.
  • For PCA-based factor models, communalities are adjusted, and the residual matrix is examined 25 27.
  • Methods like Principal Axis Factoring and Image Analysis iteratively refine communality estimates and factor loadings 32 33.
  • Maximum Likelihood (ML) estimation is another method that maximizes the likelihood function of the observed data under a factor model assumption 38.
  • Factor rotation (e.g., Varimax, Quartimax) is used to improve the interpretability of factor loadings without changing the explained variance structure 39 43 44 46.
  • Factor scores can be interpreted similarly to Principal Component scores, representing the value of the factor for each observation 49.
  • The Measure of Sampling Adequacy (MSA) assesses if the correlation matrix is suitable for factor analysis by comparing correlations to partial correlations 41.

Key concepts

  • Latent factors (ξ\xi): Unobservable, underlying constructs that explain correlations among observed variables 2.
  • Factor loadings (λ\lambda): Coefficients representing the strength of the relationship between an observed variable and a latent factor 2.
  • Communality (h2h^2): The proportion of a variable's variance explained by the common factors 35 5.
  • Specificity (ψ\psi): The proportion of a variable's variance that is unique to that variable and not explained by common factors 5.
  • Implied correlation matrix (RiR_i): The correlation matrix predicted by the factor model 15 8.
  • Factor indeterminacy: The solution for factor loadings is not unique, meaning multiple models can equally explain the observed correlations 13 15.
  • Factor rotation: Transformation of factor loadings to enhance interpretability by simplifying the factor structure 39 43.
  • Varimax rotation: An orthogonal rotation that maximizes the variance of the squared loadings for each factor, aiming for factors that load highly on a few variables and low on others
  • Quartimax rotation: An orthogonal rotation that maximizes the variance of squared loadings across factors, aiming for variables to load highly on a few factors 45.

Implications

  • EFA helps uncover underlying structures and reduce dimensionality in datasets 16.
  • Interpreting factors is crucial for understanding the conceptual meaning of latent constructs 12 37 48.
  • The choice of method and the number of factors retained can influence the interpretation of the results 26.

Common pitfalls


Exploratory factor analysis rotation methods

Core idea

  • Rotation aims to simplify the factor structure by transforming the original factor loadings without changing the underlying factor solution's explained variance .
  • The goal is to achieve loadings that are either high or low (close to zero) for each variable on each factor, aiding interpretation .

Key facts

  • Orthogonal rotations maintain the independence of factors.
  • Quartimax rotation focuses on maximizing the variance of squared loadings across factors for each variable (row-wise) .
  • Varimax rotation focuses on maximizing the variance of squared loadings for each factor across variables (column-wise) .
  • Varimax is generally preferred for its interpretability by spreading the variance of squared loadings more evenly across factors .
  • Rotated factor loadings are presented in an "Orthogonal Transformation Matrix" and a "Rotated Factor Pattern" .
  • The "Variance Explained by Each Factor" and "Final Communality Estimates" are also part of the rotation output .

Key concepts

  • Factor rotation is a post-extraction procedure to improve the interpretability of factors.
  • Orthogonal transformation matrix represents the rotation of the original factor axes.
  • Rotated factor pattern shows the loadings of variables on the new, rotated factors.
  • Factor scores represent the value of a factor for each observation, interpreted similarly to principal component scores .
  • Interpretation of factors is facilitated by rotation, allowing for clearer labeling (e.g., "verbal ability" vs. "quantitative ability") .

Implications

  • Rotation significantly aids in the practical interpretation of EFA results by simplifying factor structures.
  • Different rotation methods can lead to different factor interpretations, although the overall explained variance remains constant.
  • The choice of rotation method can influence which variables load highly on which factors.
  • Understanding rotation is crucial for making sense of the underlying latent constructs identified by EFA.

Common pitfalls

  • Misinterpreting rotated loadings without considering the rotation method used.
  • Over-interpreting factors based on a solution that has not been adequately rotated for interpretability.

Evaluating cluster solutions and different clustering methods

Core idea

  • Cluster analysis aims to group similar observations into clusters and dissimilar observations into different clusters .
  • It is a form of unsupervised learning in data mining .

Key facts

  • Hierarchical methods can be agglomerative (starting with n clusters and merging) or divisive (starting with 1 cluster and splitting) .
  • Nonhierarchical (partitioning) algorithms select K initial clusters and reassign observations until no improvement occurs .
  • Euclidean distance is common but not scale-invariant; standardized data or weighted distances can address this .
  • For binary data, association measures like Jaccard similarity are used .
  • Hierarchical methods include centroid, single linkage, complete linkage, average linkage, and Ward's method .
  • Nonhierarchical methods like K-means require pre-selecting the number of clusters (K) .
  • PAM (Partitioning Around Medoids) uses medoids instead of centroids, making it more robust to outliers .

Key concepts

  • Euclidean distance: Measures the straight-line distance between two points in multidimensional space. Formula: d(xi,xj)=∑k=1K(xik−xjk)2d(x_i, x_j) = \sqrt{\sum_{k=1}^{K} (x_{ik} - x_{jk})^2} .
  • Scale invariance: Euclidean distance is affected by variable scales; standardization or weighted distances (ds(xi,xj)=∑k=1K(xik−xjk)2sk2d_s(x_i, x_j) = \sqrt{\sum_{k=1}^{K} \frac{(x_{ik} - x_{jk})^2}{s^2_k}}) can mitigate this .
  • Hierarchical clustering distances:
  • Centroid method: Distance between cluster centroids .
  • Single linkage: Minimum distance between any two points in different clusters. Prone to "chaining" .
  • Complete linkage: Maximum distance between any two points in different clusters .
  • Average linkage: Average distance between all pairs of points in different clusters .
  • Ward's method: Minimizes the increase in total within-cluster variance (SSw) when merging clusters .
  • K-means: Iteratively assigns observations to the nearest centroid and recomputes centroids until convergence .
  • Medoid: A representative observation within a cluster, used in PAM .

Implications

  • Different clustering methods can produce different cluster structures .
  • Standardization of variables is often necessary due to differing scales .
  • The choice of distance measure significantly impacts the clustering outcome .
  • Hierarchical clustering results are often visualized as a dendrogram .

Evaluating cluster solutions

  • RMSSTD (Root-Mean-Square Standard Deviation): Measures the overall standard deviation of variables; smaller values indicate more homogeneous data .
  • RMSSTD of new cluster: Measures the standard deviation within a newly formed cluster; should be small .

Common mistakes to avoid

  • Review all topics thoroughly before exams
  • Pay attention to formulas and key definitions
  • Practice with examples provided in each section
  • Don't memorize without understanding the underlying concepts

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also