1. Introduction and Methodological Foundations
This practical how-to guide presents the theoretical foundations, structural mathematical equations, detailed breakdown of 6 specialized lessons, and multi-platform replication workflows for 1. Introduction and Methodological Foundations from the textbook Applied Quantitative Data Analysis with IBM SPSS, with direct cross-references to the authoritative source material at https://sachktl.tnsai.vn/vi/spss/gioi-thieu/.
1. Methodological Foundations, Mathematical Specification, and Identification
Part 1: The SPSS Environment SPSS is a user-friendly program that facilitates data management and statistical analyses. The first section of this tutorial will provide a basic introduction to navigating the SPSS program. Interacting with SPSSThis tutorial covers the various screens of SPSS, and discusses the two ways of interacting with SPSS: through the drop-down menus, or through syntax. The Data View WindowVariables are observable and measurable traits of interest. Cases are records of information on one or more variables.
1.1. Structural Equations and Representative Estimator
1.2. Core Identification Assumptions and Applicability Conditions
- Correct functional form specification in parameters without omitting relevant covariates correlated with included regressors.
- Zero conditional mean of disturbances , ensuring unbiasedness and asymptotic consistency.
- Full column rank of the design matrix without exact multicollinearity, paired with HC1 or cluster-robust standard errors under heteroskedasticity.
Read the complete theoretical derivations, mathematical proofs, and worked examples for this chapter on SachKTL.
Extract standardized Vietnamese macroeconomic, corporate financial, and household survey data for hands-on replication.
Execute econometric specifications, run diagnostic battery tests, and export APA 7th / AER publication-grade tables automatically.
2. Lesson-by-Lesson Academic Breakdown
2.1. Thiết lập môi trường
The SPSS Environment SPSS utilizes multiple types of windows, or screens, in its basic operations. Each window is associated with specific tasks and types of SPSS files. The windows include the Data Editor, Output Viewer, Syntax Editor, Pivot Table Editor, Chart Editor, and Text Output Editor. The following sections describe the basic purposes and functions of the three most common windows—the Data Editor, Output Viewer, and Syntax Editor—since these three windows are integral for most every action performed in the program.
Key Methodological Sub-Topics Covered in This Lesson:
-
The SPSS Environment
-
Data Editor
-
Output Viewer
-
Syntax Editor
-
Active Windows
-
SPSS Toolbar Shortcuts
-
Analytical Environments:
IBM SPSS 29· Authoritative Source: Read Full Original Lesson on SachKTL
2.2. Cú pháp câu lệnh
What is Syntax? SPSS syntax is a programming language that is unique to SPSS. It allows you to write commands that run SPSS procedures, rather than using the graphical user interface. Syntax allows users to perform tasks that would be too tedious or difficult to do using the drop-down menus. This is the case when you are re-running the same analysis many times, or doing complex transformations on data. Syntax also provides a record of how you transformed and analyzed your data, and allows you to instantly reproduce those steps at any time.
Key Methodological Sub-Topics Covered in This Lesson:
-
What is Syntax?
-
Basic Syntax Rules
-
Formatting
-
Comments
-
Color-Coding
-
Using Syntax
-
Analytical Environments:
IBM SPSS 29· Authoritative Source: Read Full Original Lesson on SachKTL
2.3. Khai báo biến
Variable Types In order for your data analysis to be accurate, it is imperative that you correctly identify the type and formatting of each variable. SPSS has special restrictions in place so that statistical analyses can't be performed on inappropriate types of data: for example, you won't be able to use a continuous variable as a "grouping" variable when performing a t-test. Information for the type of each variable is displayed in the Variable View tab. Under the “Type” column, simply click the cell associated with the variable of interest.
Key Methodological Sub-Topics Covered in This Lesson:
-
Variable Types
-
Numeric
-
String
-
Comma
-
Dot
-
Scientific notation
-
Analytical Environments:
IBM SPSS 29· Authoritative Source: Read Full Original Lesson on SachKTL
2.4. Dữ liệu ngày tháng
Working with Dates and Times in SPSS Datasets often include variables that denote dates or time. Thus, it is important to know how SPSS treats and works with such variables. In the following sections, we will discuss: How date-time variables work in SPSS. Standard formats for dates and time. Defining date-time variables in the Variable View window and through the Date and Time Wizard. Setting the century range for two-digit years. Converting a string variable containing a date into an actual date variable.
Key Methodological Sub-Topics Covered in This Lesson:
-
Working with Dates and Times in SPSS
-
Date-Time Variables in SPSS
-
Standard Formats for Dates and Times
-
Date Formats
-
Durations
-
Defining Date-Time Variables in the Variable View Tab
-
Analytical Environments:
IBM SPSS 29· Authoritative Source: Read Full Original Lesson on SachKTL
2.5. Mã hóa biến
Defining Variables Defining a variable includes giving it a name, specifying its type, the values the variable can take, etc. Without this information, your data will be much harder to understand and use. Whenever you are working with data, it is important to make sure the variables in the data are defined so that you can tell exactly what was measured, and how. There are three ways of defining information about variables: The Variable View column attributes. Syntax. The Define Variable Properties window.
Key Methodological Sub-Topics Covered in This Lesson:
-
Defining Variables
-
Defining Variables in the Variable View
-
Name
-
Type
-
Width
-
Decimals
-
Analytical Environments:
IBM SPSS 29· Authoritative Source: Read Full Original Lesson on SachKTL
2.6. Mô tả biến
Codebooks A codebook is a document containing information about each of the variables in your dataset, such as: The name assigned to the variable What the variable represents How the variable was measured How the variable was actually recorded in the raw data For scale variables: The variable's units of measurement For categorical variables: If coded numerically, the numeric codes and what they represent Codebooks can also contain documentation about when and how the data was created.
Key Methodological Sub-Topics Covered in This Lesson:
-
Codebooks
-
Creating a Codebook from an SPSS Datafile
-
Simple Codebook
-
Using the Menus
-
Using Syntax
-
Detailed Codebook
-
Analytical Environments:
IBM SPSS 29· Authoritative Source: Read Full Original Lesson on SachKTL
3. Step-by-Step Empirical Implementation Workflow
1. Formulate the Research Question and Prepare Data on EcoData & Finco
Define the dependent variable, core explanatory variables, and control covariates aligned with 1. Introduction and Methodological Foundations. Extract standardized Vietnamese empirical series from EcoData or Finco, and screen for missing observations and extreme outliers.
2. Conduct Descriptive Profiling, Correlation Analysis, and Pre-Estimation Checks
Examine empirical distributions, construct summary statistics tables, and evaluate collinearity using pairwise correlation matrices and Variance Inflation Factors (VIF).
3. Estimate the Model Across Stata 18 MP, R 4.x, and Python 3.11+
Execute the parameter estimation scripts matching the structural equations in Section 1.1 while cross-checking theoretical derivations at SachKTL.
4. Perform Post-Estimation Diagnostics and Robust Variance Correction
Test for heteroskedasticity, serial correlation, Ramsey RESET functional form misspecification, and regressor endogeneity. Apply White HC1 or cluster-robust standard errors for valid inference.
4. Multi-Platform Implementation Scripts in Stata, R, and Python
- Stata 18 MP
- R 4.x
- Python 3.11+
* Thiết lập môi trường, ước lượng mô hình và kiểm định chẩn đoán toàn diện
version 18.0
clear all
set more off
import delimited "sachktl_empirical_ecodata.csv", clear encoding("utf-8")
describe
summarize y x1 x2 x3, detail
* 1. Ước lượng mô hình cơ sở và kiểm định phương sai thay đổi / đa cộng tuyến / dạng hàm
regress y x1 x2 x3
estat hettest
estat imtest, white
estat vif
estat ovtest
* 2. Ước lượng với sai số chuẩn vững White HC1 và xuất tác động biên
regress y c.x1##c.x2 x3, vce(robust)
margins, dydx(x1 x2 x3)
# Nạp thư viện phân tích kinh tế lượng và thực thi kiểm định chẩn đoán
library(tidyverse)
library(lmtest)
library(sandwich)
library(car)
df <- read.csv("sachktl_empirical_ecodata.csv")
summary(df)
# 1. Ước lượng mô hình tuyến tính và kiểm định Breusch-Pagan, RESET, VIF
fit <- lm(y ~ x1 + x2 + x3, data = df)
bptest(fit)
resettest(fit, power = 2:3, type = "fitted")
vif(fit)
# 2. Xuất bảng hệ số ước lượng với sai số chuẩn vững HC1
coeftest(fit, vcov = vcovHC(fit, type = "HC1"))
# Nạp thư viện statsmodels và thực thi ước lượng kèm chẩn đoán phần dư
import pandas as pd
import statsmodels.api as sm
import statsmodels.formula.api as smf
from statsmodels.stats.diagnostic import het_breuschpagan, linear_reset
from statsmodels.stats.outliers_influence import variance_inflation_factor
df = pd.read_csv("sachktl_empirical_ecodata.csv")
# 1. Ước lượng mô hình với sai số chuẩn vững HC1
model = smf.ols("y ~ x1 + x2 + x3", data=df).fit(cov_type="HC1")
print(model.summary())
# 2. Kiểm định phương sai thay đổi Breusch-Pagan, Ramsey RESET và hệ số VIF
bp_lm, bp_pval, _, _ = het_breuschpagan(model.resid, model.model.exog)
reset_res = linear_reset(model, power=2, use_f=True)
X = sm.add_constant(df[["x1", "x2", "x3"]].dropna())
vifs = {col: variance_inflation_factor(X.values, i) for i, col in enumerate(X.columns)}
print(f"Breusch-Pagan p={bp_pval:.4f} | RESET p={reset_res.pvalue:.4f} | VIF={vifs}")
5. Post-Estimation Diagnostic and Interpretation Guide
| Diagnostic Criterion | Null Hypothesis | Benchmark Threshold | Corrective Action When Is Rejected |
|---|---|---|---|
| Heteroskedasticity | Constant error variance | rejects | Apply vce(robust), vcovHC(HC1), or FGLS/WLS weighted estimation |
| Multicollinearity | No severe linear dependence among regressors | acceptable | Drop redundant covariates, center interactions, or apply LASSO/Ridge regularization |
| Ramsey RESET Functional Form | No omitted nonlinear or higher-order terms | retains | Add interaction terms, quadratic polynomials, or log-transform skewed positive variables |
| Regressor Exogeneity | Orthogonality | Durbin-Wu-Hausman | Transition to IV/2SLS, LIML, or GMM estimation with validated instruments |
6. Video Tutorial Walkthrough
Video Tutorial: Practical Walkthrough for 1. Introduction and Methodological Foundations on SachKTL
7. Complete Lesson Directory and Backlinks to Original SachKTL Articles
| Lesson Code | Lesson Title | Supported Software | Original Source Link on SachKTL |
|---|---|---|---|
| 1.1 | Thiết lập môi trường | IBM SPSS 29 | Open Original Lesson on SachKTL |
| 1.2 | Cú pháp câu lệnh | IBM SPSS 29 | Open Original Lesson on SachKTL |
| 1.3 | Khai báo biến | IBM SPSS 29 | Open Original Lesson on SachKTL |
| 1.4 | Dữ liệu ngày tháng | IBM SPSS 29 | Open Original Lesson on SachKTL |
| 1.5 | Mã hóa biến | IBM SPSS 29 | Open Original Lesson on SachKTL |
| 1.6 | Mô tả biến | IBM SPSS 29 | Open Original Lesson on SachKTL |