Econometric Hypothesis Testing, F-Tests, and R Implementation Notes
Scale of Measurement and Hypothesis Testing Framework
Housing Data Framework and Measurement Scale:
- The scaling of measurement units directly impacts the numerical value of estimated coefficients without altering underlying statistical relationships.
- When housing values are measured in different monetary increments (e.g., , , or ), the point estimates change proportionally to match the scale.
- Evaluation of coefficient magnitude requires distinguishing between practical significance (the real-world size of the effect given the measurement scale) and statistical significance.
- A coefficient may appear numerically tiny due to a large scale of measurement, yet remain statistically meaningful.
Non-Zero Null Hypothesis Testing:
- Standard null hypotheses test whether a parameter equals zero (), but specific theoretical hypotheses require testing non-zero specific values, such as .
- The general formula for calculating the when testing a specific hypothesized parameter value is:
- When testing , the test statistic is constructed by substituting into the formula:
- Execution in R Code (Line 30):
- At line 30 of the script, the parameter estimate vector
fit_hat(extracting row elements 1 through 5) is utilized. - The specified value is subtracted directly from the point estimate in the numerator before dividing by the saved standard error to derive the correct and corresponding .
- At line 30 of the script, the parameter estimate vector
Probability Values, Model Estimation, and Stargazer Table Output
Computation Mechanics:
- The is calculated using the probability density function and the appropriate degrees of freedom associated with the model's test statistic.
- For a standard two-tailed hypothesis test, R computes the lower-tail probability for the calculated test statistic and multiplies this area by to account for both tails of the distribution.
- Example output interpretation: A computed of exceeds standard significance thresholds ( and ), leading to a failure to reject the null hypothesis.
Major League Baseball (MLB) Player Salary Empirical Example:
- Outcome/Dependent Variable: MLB player salary (
lowest salaryor log salary). - Primary explanatory variables evaluated for determining player compensation:
- Years of professional playing experience (
years). - Games played per year (
games). - Batting average (
attrition/bavg).
- Outcome/Dependent Variable: MLB player salary (
Exporting Regression Tables using
stargazer:- Regression objects are estimated and saved across script lines (e.g., line 6, line 2, line 95, line 9).
- The
stargazerpackage aggregates multiple saved regression models into a unified publication-ready table format. - Command option
outis specified to output the structured table directly to an external text or document file (e.g.,out = "regression_results.txt"). - Layout structure of generated tables: Displays the dependent variable at the top header, followed by rows for each independent variable with corresponding coefficient estimates listed above their standard errors placed in parentheses.
Sum of Squared Residuals and F-Test Mechanics
Foundation of the :
- The evaluates structural restrictions by comparing the Sum of Squared Residuals () between an unrestricted model () and a restricted model ().
- Null Hypothesis Example: Testing whether a parameter is zero ().
- Automatic Variable Removal: If is true, omitting the variable does not worsen model fit, meaning the error terms and sum of squared residuals of both models are virtually identical ().
- The test statistic measures the relative difference between and .
Properties of the :
- Under the null hypothesis, the ratio of residual variances follows an anchored at or near .
- When the null hypothesis is true, the observed falls very close to .
- As the computed becomes larger, the discrepancy between the restricted and unrestricted models grows, providing evidence against the null hypothesis.
Overall Significance Test ( for Joint Significance):
- Formally tests whether all slope coefficients simultaneously equal zero against the alternative that at least one coefficient is non-zero:
- Restricted Model: Contains only the constant intercept term ().
- Unrestricted Model: Contains the intercept plus all explanatory variables (e.g., a 10-variable specification).
- Rejection of indicates that the set of explanatory variables jointly explains a statistically significant portion of the variance in the dependent variable.
Single Hypothesis Testing, Significance Rules, and the car Package
- Equivalence of and for Single Restrictions:
- When testing a single linear restriction ( restriction), the and yield identical statistical decisions and .
- Mathematically, for a single hypothesis restriction, the relationship between statistics is:
Programming Advantage: Executing single restrictions via an framework in R is often syntax-wise simpler due to standardized software package functions.
- Implementation with the
carPackage:
- Implementation with the
Package installation and library loading:
install.packages("car")library(car)
The
linearHypothesis()function provided by thecarpackage allows direct testing of parameter restrictions using saved model objects.- Empirical Rule of Thumb for Statistical Significance:
Standard ratio check from regression outputs:
- Rule of Thumb: If the absolute value of the point estimate is more than twice as large as its standard error (referencing the critical threshold at the significance level), the variable is deemed statistically significant.
Joint Hypothesis Testing and Linear Combinations of Parameters
Testing Joint Hypotheses in R:
- Multiple parameter constraints can be tested simultaneously within
linearHypothesis()by combining hypothesis strings using R's concatenate functionc(). - Example for two linear restrictions ( parameters tested jointly):
linearHypothesis(model_fit, c("var1 = 0", "var2 = 0"))
- Multiple parameter constraints can be tested simultaneously within
Testing Linear Combinations of Parameters:
- Used when testing hypothesis constraints involving combinations of multiple parameters, such as:
Practical context: Evaluating partial or marginal effects containing interaction terms or non-linear functions at specific variable values.
Marginal effect evaluation example: Testing experience effects at specific thresholds, such as evaluated at 10 years of experience (e.g., testing ) or evaluating combined experience and education interaction effects (e.g., ).
Syntax Constraint: Explicit multiplication symbols inside string arguments in
linearHypothesis()can cause execution errors if not formatted correctly.Interaction specification in R regression formulas: Specified using the colon operator (
:) or multiplication operator (*).- Alternative Reparameterization Approach (Line 48):
If
linearHypothesis()is not utilized, testing linear combinations manually requires defining a transformed parameter (e.g., ).Substitute back into the structural model equation and re-estimate the modified regression model to evaluate the standard error and of directly (as shown in script line 48).
Course Evaluation Guidelines and R Software Workflows
Examination Policies and Guidelines:
- Examinations are administered in an open-notes format.
- Students are advised to practice completing problem sets without relying heavily on notes to build procedural mastery.
- Exam questions and exercises are directly derived from practice homework problems.
Software Requirements:
- Course assignments, including specific homework questions (e.g., Question 7), require executing statistical commands, extracting significance metrics, and conducting linear combination tests using R code rather than legacy software such as EViews.