Skip to main content

5. Phân tích dữ liệu

Verified Environments & Platforms:Academic FreeResearcher ProInstitutional VIP

This practical how-to guide presents the theoretical foundations, structural mathematical equations, detailed breakdown of 6 specialized lessons, and multi-platform replication workflows for 5. Phân tích dữ liệu 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/phan-tich-du-lieu/.

Applied Quantitative Data Analysis w5. Phân tích dữ liệuApplied Econometrics, Statistical Modeling, and Hypothesis Testing · 6 Detailed LessoStata 18 MPR 4.xPython 3.11+TNSAI Ecosystem

1. Methodological Foundations, Mathematical Specification, and Identification​

View our tutorials for analyzing data using inferential statistical methods in SPSS. Part 1: Inferential Statistics for Association In Part I, we cover common inferential statistics for testing the relationship or association between variables. Pearson CorrelationPearson correlation is used to assess the strength of a linear relationship between two continuous numeric variables. Chi-square Test of IndependenceThe Chi-Square Test of Independence is used to test if two categorical variables are independent of each other.

1.1. Structural Equations and Representative Estimator​

Yi=β0+∑k=1KβkXik+εi,E[εi∣Xi]=0[1]Y_i = \beta_0 + \sum_{k=1}^K \beta_k X_{ik} + \varepsilon_i, \quad \mathbb{E}[\varepsilon_i \mid \mathbf{X}_i] = 0 \tag*{[1]} Var^HC1(β^)=NN−K−1(X′X)−1(∑i=1Nε^i2xixi′)(X′X)−1[2]\widehat{\text{Var}}_{\text{HC1}}(\hat{\boldsymbol{\beta}}) = \frac{N}{N - K - 1}\left(\mathbf{X}'\mathbf{X}\right)^{-1}\left(\sum_{i=1}^N \hat{\varepsilon}_i^2 \mathbf{x}_i \mathbf{x}_i'\right)\left(\mathbf{X}'\mathbf{X}\right)^{-1} \tag*{[2]}

1.2. Core Identification Assumptions and Applicability Conditions​

  1. Correct functional form specification in parameters without omitting relevant covariates correlated with included regressors.
  2. Zero conditional mean of disturbances E[εi∣Xi]=0\mathbb{E}[\varepsilon_i \mid \mathbf{X}_i] = 0, ensuring unbiasedness and asymptotic consistency.
  3. Full column rank of the design matrix X\mathbf{X} without exact multicollinearity, paired with HC1 or cluster-robust standard errors under heteroskedasticity.
Methodological Scope Boundary:When explanatory variables are endogenous due to simultaneity, measurement error, or omitted confounders, OLS estimates are biased and inconsistent; transition to IV/2SLS or GMM estimation.

2. Lesson-by-Lesson Academic Breakdown​

2.1. Kiểm định Chi - bình phương​

The Chi-Square Test of Independence is used to test if two categorical variables are associated. Chi-Square Test of Independence The Chi-Square Test of Independence determines whether there is an association between categorical variables . It is a nonparametric test. This test is also known as: Chi-Square Test of Association. This test utilizes a contingency table to analyze the data. A contingency table is an arrangement in which data is classified according to two categorical variables.

Key Methodological Sub-Topics Covered in This Lesson:

  • Chi-Square Test of Independence

  • Common Uses

  • Data Requirements

  • Hypotheses

  • Test Statistic

  • Data Set-Up

  • Analytical Environments: Stata 18 MP, R 4.x, Python 3.11+ · Authoritative Source: Read Full Original Lesson on SachKTL

2.2. Hệ số tương quan​

The bivariate Pearson Correlation measures the strength and direction of linear relationships between pairs of continuous variables. Pearson Correlation The bivariate Pearson Correlation produces a sample correlation coefficient, r, which measures the strength and direction of linear relationships between pairs of continuous variables.

Key Methodological Sub-Topics Covered in This Lesson:

  • Pearson Correlation

  • Common Uses

  • Data Requirements

  • Hypotheses

  • Test Statistic

  • Data Set-Up

  • Analytical Environments: R 4.x · Authoritative Source: Read Full Original Lesson on SachKTL

2.3. T-test một mẫu​

The One Sample t Test compares a sample mean to a hypothesized value for the population mean to determine whether the two means are significantly different. One Sample t Test The One Sample t Test examines whether the mean of a population is statistically different from a known or hypothesized value. The One Sample t Test is a parametric test.

Key Methodological Sub-Topics Covered in This Lesson:

  • One Sample t Test

  • Common Uses

  • Data Requirements

  • Hypotheses

  • Test Statistic

  • Data Set-Up

  • Analytical Environments: Stata 18 MP, R 4.x, Python 3.11+ · Authoritative Source: Read Full Original Lesson on SachKTL

2.4. t-test cặp đôi​

Paired t tests are used to test if the means of two paired measurements, such as pretest/posttest scores, are significantly different. Paired Samples t Test The Paired Samples t Test compares the means of two measurements taken from the same individual, object, or related units. These "paired" measurements can represent things like: A measurement taken at two different times A measurement taken under two different conditions Measurements taken from two halves or sides of a subject or experimental unit .

Key Methodological Sub-Topics Covered in This Lesson:

  • Paired Samples t Test

  • Common Uses

  • Data Requirements

  • Hypotheses

  • Test Statistic

  • Data Set-Up

  • Analytical Environments: Stata 18 MP, R 4.x, Python 3.11+ · Authoritative Source: Read Full Original Lesson on SachKTL

2.5. T-test hai mẫu độc lập​

The Independent Samples t Test compares two sample means to determine whether the population means are significantly different. Independent Samples t Test The Independent Samples t Test compares the means of two independent groups in order to determine whether there is statistical evidence that the associated population means are significantly different. The Independent Samples t Test is a parametric test.

Key Methodological Sub-Topics Covered in This Lesson:

  • Independent Samples t Test

  • Common Uses

  • Data Requirements

  • Hypotheses

  • Levene’s Test for Equality of Variances

  • Test Statistic

  • Analytical Environments: Stata 18 MP, R 4.x, Python 3.11+ · Authoritative Source: Read Full Original Lesson on SachKTL

2.6. ANOVA một chiều​

One-way ANOVA is used to test if the means of two or more groups are significantly different. One-Way ANOVA One-Way ANOVA compares the means of two or more independent groups in order to determine whether there is statistical evidence that the associated population means are significantly different. One-Way ANOVA is a parametric test.

Key Methodological Sub-Topics Covered in This Lesson:

  • One-Way ANOVA

  • Common Uses

  • Data Requirements

  • Hypotheses

  • Test Statistic

  • Data Set-Up

  • Analytical Environments: Stata 18 MP, R 4.x, Python 3.11+ · 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 5. Phân tích dữ liệu. 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.

5. Format Journal-Grade Tables and Cross-Verify on EcoLab

Report point estimates, standard errors in parentheses, and statistical significance stars following APA 7th / AER Booktabs standards, or automate the entire reporting pipeline on EcoLab and VietLOD.

4. Multi-Platform Implementation Scripts in Stata, R, and Python​

* 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)

5. Post-Estimation Diagnostic and Interpretation Guide​

Diagnostic CriterionNull Hypothesis H0H_0Benchmark ThresholdCorrective Action When H0H_0 Is Rejected
HeteroskedasticityConstant error variance Var(εi)=σ2\text{Var}(\varepsilon_i) = \sigma^2p-value<0.05p\text{-value} < 0.05 rejects H0H_0Apply vce(robust), vcovHC(HC1), or FGLS/WLS weighted estimation
MulticollinearityNo severe linear dependence among regressorsVIF<10\text{VIF} < 10 acceptableDrop redundant covariates, center interactions, or apply LASSO/Ridge regularization
Ramsey RESET Functional FormNo omitted nonlinear or higher-order termsp-value>0.05p\text{-value} > 0.05 retains H0H_0Add interaction terms, quadratic polynomials, or log-transform skewed positive variables
Regressor ExogeneityOrthogonality Cov(X,ε)=0\text{Cov}(X, \varepsilon)=0Durbin-Wu-Hausman p>0.05p > 0.05Transition to IV/2SLS, LIML, or GMM estimation with validated instruments

6. Video Tutorial Walkthrough​

Video Tutorial: Practical Walkthrough for 5. Phân tích dữ liệu on SachKTL
Lesson CodeLesson TitleSupported SoftwareOriginal Source Link on SachKTL
5.1Kiểm định Chi - bình phươngStata 18 MP, R 4.x, Python 3.11+Open Original Lesson on SachKTL
5.2Hệ số tương quanR 4.xOpen Original Lesson on SachKTL
5.3T-test một mẫuStata 18 MP, R 4.x, Python 3.11+Open Original Lesson on SachKTL
5.4t-test cặp đôiStata 18 MP, R 4.x, Python 3.11+Open Original Lesson on SachKTL
5.5T-test hai mẫu độc lậpStata 18 MP, R 4.x, Python 3.11+Open Original Lesson on SachKTL
5.6ANOVA một chiềuStata 18 MP, R 4.x, Python 3.11+Open Original Lesson on SachKTL