Chuyển tới nội dung chính

4. Khai phá dữ liệu

Môi trường & nền tảng hỗ trợ:Academic FreeResearcher ProInstitutional VIP

Tài liệu hướng dẫn thực hành này trình bày toàn diện cơ sở lý thuyết, hệ phương trình toán học, nội dung chi tiết của 7 bài học chuyên đề và quy trình ước lượng đa phần mềm cho 4. Khai phá dữ liệu thuộc bộ giáo trình Phân tích dữ liệu với SPSS, đối chiếu trực tiếp với nguồn học liệu gốc tại https://sachktl.tnsai.vn/vi/spss/khai-pha-du-lieu/.

Phân tích dữ liệu với SPSS4. Khai phá dữ liệuKinh tế lượng ứng dụng, mô hình hóa thống kê và kiểm định giả thuyết · 7 bài học chuyStata 18 MPR 4.xPython 3.11+TNSAI Ecosystem

1. Cơ sở phương pháp luận, biểu diễn toán học và giả thiết nhận dạng​

Introduction Before doing any kind of statistical testing or model building, you should always examine your data using summary statistics and graphs. This process is called exploratory data analysis, and it's a crucial part of every research project. Exploratory data analysis is about "getting to know" your data: which values are typical, which values are unusual; where is it centered, how spread out is it; what are its extremes. More importantly, it's an opportunity to identify and correct any problems in your data that would affect the conclusions you draw from your analysis.

1.1. Hệ phương trình cấu trúc và công thức ước lượng đại diện​

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. Các giả thiết nhận dạng và điều kiện áp dụng​

  1. Dạng hàm tuyến tính theo tham số được xác định đúng, không bỏ sót biến giải thích quan trọng có tương quan với các biến trong mô hình.
  2. Kỳ vọng có điều kiện của sai số bằng không E[εi∣Xi]=0\mathbb{E}[\varepsilon_i \mid \mathbf{X}_i] = 0, đảm bảo tính không chệch và vững tiệm cận của ước lượng.
  3. Ma trận thiết kế X\mathbf{X} có hạng cột đầy đủ, không xảy ra đa cộng tuyến hoàn hảo và sử dụng sai số chuẩn vững HC1/Cluster khi có phương sai thay đổi.
Giới hạn phạm vi áp dụng:Khi tồn tại biến giải thích nội sinh do đồng thời hai chiều, sai số đo lường hoặc bỏ sót biến không quan sát được, ước lượng OLS bị chệch và không vững; cần chuyển sang ước lượng biến công cụ IV/2SLS hoặc GMM.

2. Phân tích chuyên sâu từng bài học trong chương​

2.1. Thống kê đơn biến​

Explore The Explore procedure produces detailed univariate statistics and graphs for numeric scale variables for an entire sample, or for subsets of a sample. It can also be used to assess the normality of a numeric scale variable with special inferential statistics and detailed diagnostic plots. To run the Explore procedure, click Analyze > Descriptive Statistics > Explore. A Dependent List: The continuous numeric variables you wish to analyze. B Factor List: Categorical variables to subset the analysis by.

Các nội dung học thuật trọng tâm trong bài học:

  • Explore

  • About the normality plots with tests option

  • About boxplot types in the explore procedure

  • Two numeric variables, no factors

  • Factor levels together

  • Dependents together

  • Môi trường thực hành: IBM SPSS 29 · Tài liệu gốc: Đọc toàn văn bài học tại SachKTL

2.2. Tần suất đơn biến​

When applied to scale variables, the Frequencies procedure in SPSS can compute quartiles, percentiles, and other summary statistics. It can also create histograms with an estimated normal distribution overlaid on the graph. Introduction When summarizing quantitative variables, we are typically interested in questions like: What is the "center" of the data? How spread out is the data? What are the extremes of the data? What is the "shape" of the distribution? Is it symmetric or asymmetric?

Các nội dung học thuật trọng tâm trong bài học:

  • Introduction

  • Using the frequencies procedure with scale variables

  • Example: Comparing percentiles for more than two variables

  • Problem statement

  • Running the procedure

  • Using the frequencies dialog window

  • Môi trường thực hành: IBM SPSS 29 · Tài liệu gốc: Đọc toàn văn bài học tại SachKTL

2.3. Thống kê đa biến​

Descriptives is best to obtain quick summaries of numeric variables, or to compare several numeric variables side-by-side. Introduction When summarizing quantitative variables, we are typically interested in questions like: What is the "center" of the data? How spread out is the data? What are the extremes of the data? What is the "shape" of the distribution? Is it symmetric or asymmetric? Are the values mostly clustered about the mean, or are there many values in the "tails" of the distribution?

Các nội dung học thuật trọng tâm trong bài học:

  • Introduction

  • Descriptives

  • Example: Comparing average test scores side-by-side

  • Problem statement

  • Running the procedure

  • Using the descriptives dialog window

  • Môi trường thực hành: IBM SPSS 29 · Tài liệu gốc: Đọc toàn văn bài học tại SachKTL

2.4. Thống kê theo nhóm​

Compare Means is best used when you want to compare several numeric variables with respect to one or more categorical variables. It is especially useful for summarizing numeric variables simultaneously across categories. Compare Means The Compare Means procedure is useful when you want to summarize and compare differences in descriptive statistics across one or more factors, or categorical variables. To open the Compare Means procedure, click Analyze > Compare Means > Means. A Dependent List: The continuous numeric variables to be analyzed.

Các nội dung học thuật trọng tâm trong bài học:

  • Compare means

  • Example: Comparing averages across related demographic variables

  • Problem statement

  • Compare means: Basic report, no layers

  • Running the procedure

  • Output

  • Môi trường thực hành: IBM SPSS 29, R 4.x · Tài liệu gốc: Đọc toàn văn bài học tại SachKTL

2.5. Tạo bảng tần suất​

In SPSS, the Frequencies procedure is primarily used to create frequency tables, bar charts, and pie charts for categorical variables. Introduction When summarizing a categorical or qualitative variable , we are typically interested in questions like: How many unique categories were there? How many observations fell into each category? Were there any categories with zero observations? Were there any observations with missing responses? What proportion of the observations fell into each category?

Các nội dung học thuật trọng tâm trong bài học:

  • Introduction

  • Data requirements

  • Data set-up

  • Create a frequency table in SPSS

  • Example: Summarizing a categorical variable

  • Running the procedure

  • Môi trường thực hành: IBM SPSS 29 · Tài liệu gốc: Đọc toàn văn bài học tại SachKTL

2.6. Tạo bảng chéo​

The Crosstabs procedure is used to create contingency tables, which describe the interaction between two categorical variables. Crosstabs To describe a single categorical variable, we use frequency tables. To describe the relationship between two categorical variables, we use a special type of table called a cross-tabulation . In a cross-tabulation, the categories of one variable determine the rows of the table, and the categories of the other variable determine the columns.

Các nội dung học thuật trọng tâm trong bài học:

  • Crosstabs

  • Describing a crosstab

  • Example 1: A "square" table

  • Example 2: A "long" table

  • Example 3: A "wide" table

  • Understanding row, column, and total percents

  • Môi trường thực hành: IBM SPSS 29, R 4.x · Tài liệu gốc: Đọc toàn văn bài học tại SachKTL

2.7. Dữ liệu đa lựa chọn​

This tutorial shows how to work with the data from "check-all-that-apply" multiple choice survey questions in SPSS Statistics using multiple response sets. Introduction This tutorial is a primer on how to work with data from multiple choice, multiple-response questions in SPSS Statistics.

Các nội dung học thuật trọng tâm trong bài học:

  • Introduction

  • Data set-up

  • Numeric code if present, blank if absent

  • Numeric codes to indicate present/not present

  • Sample data for this tutorial

  • Counting selected choices and identifying non-respondents

  • Môi trường thực hành: IBM SPSS 29 · Tài liệu gốc: Đọc toàn văn bài học tại SachKTL

3. Quy trình thực hành chuẩn từng bước trên dữ liệu thực nghiệm​

1. Xác định câu hỏi nghiên cứu và chuẩn bị dữ liệu trên EcoData & Finco

Xác định biến phụ thuộc, nhóm biến giải thích trọng tâm và biến kiểm soát phù hợp với nội dung 4. Khai phá dữ liệu. Trích xuất chuỗi dữ liệu thực nghiệm Việt Nam từ EcoData hoặc Finco, kiểm tra giá trị khuyết thiếu và ngoại lai trước khi đưa vào mô hình.

2. Thống kê mô tả, ma trận tương quan và kiểm tra tiền ước lượng

Phân tích phân phối thực nghiệm của các biến, lập bảng thống kê mô tả theo nhóm và kiểm tra hiện tượng đa cộng tuyến thông qua ma trận tương quan cặp cũng như nhân tử phóng đại phương sai VIF.

3. Ước lượng mô hình chuẩn trên Stata 18 MP, R 4.x và Python 3.11+

Thực thi kịch bản ước lượng tham số theo đúng cấu trúc phương trình toán học đã thiết lập ở Mục 1.1, đồng thời kết hợp đối chiếu với các bài học gốc tại SachKTL.

4. Kiểm định chẩn đoán sau ước lượng và hiệu chỉnh sai số chuẩn vững

Kiểm tra phương sai sai số thay đổi, tự tương quan chuỗi, dạng hàm Ramsey RESET và tính nội sinh của biến giải thích. Áp dụng sai số chuẩn vững White HC1 hoặc cụm cá thể để bảo đảm suy diễn thống kê chính xác.

5. Tổng hợp bảng kết quả chuẩn tạp chí quốc tế và đối chiếu trên EcoLab

Trình bày hệ số ước lượng, sai số chuẩn trong ngoặc đơn và ký hiệu mức ý nghĩa thống kê theo chuẩn APA 7th / AER Booktabs, hoặc tự động hóa toàn bộ quy trình báo cáo trên EcoLab và VietLOD.

4. Kịch bản mã lệnh thực hành trên Stata, R và 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. Bảng kiểm định chẩn đoán và quy tắc diễn giải kết quả​

Tiêu chí chẩn đoánGiả thuyết không H0H_0Ngưỡng đánh giá chuẩnHướng xử lý khi bác bỏ H0H_0
Phương sai sai số thay đổiPhương sai phần dư không đổi Var(εi)=σ2\text{Var}(\varepsilon_i) = \sigma^2p-value<0.05p\text{-value} < 0.05 bác bỏ H0H_0Sử dụng sai số chuẩn vững vce(robust), vcovHC(HC1) hoặc ước lượng FGLS/WLS
Đa cộng tuyến giữa các biếnKhông có phụ thuộc tuyến tính mạnh giữa các biến giải thíchVIF<10\text{VIF} < 10 là chấp nhận đượcLoại bỏ biến dư thừa, chuẩn hóa biến hoặc dùng hồi quy điều chuẩn LASSO/Ridge
Dạng hàm Ramsey RESETMô hình không bỏ sót thành phần phi tuyến bậc caop-value>0.05p\text{-value} > 0.05 chấp nhận H0H_0Bổ sung biến tương tác, đa thức bậc hai hoặc lấy logarit tự nhiên các biến dương
Tính ngoại sinh của biến giải thíchBiến giải thích không tương quan với sai số Cov(X,ε)=0\text{Cov}(X, \varepsilon)=0Kiểm định Durbin-Wu-Hausman p>0.05p > 0.05Chuyển sang ước lượng biến công cụ IV/2SLS, LIML hoặc GMM với biến công cụ hợp lệ

6. Video bài giảng hướng dẫn thực hành​

Video hướng dẫn: Hướng dẫn thực hành 4. Khai phá dữ liệu trên SachKTL

7. Danh mục toàn bộ bài học trong chương và liên kết học liệu gốc​

Mã bàiTên bài học chuyên đềPhần mềm hỗ trợLiên kết gốc tại SachKTL
4.1Thống kê đơn biếnIBM SPSS 29Mở bài học gốc trên SachKTL
4.2Tần suất đơn biếnIBM SPSS 29Mở bài học gốc trên SachKTL
4.3Thống kê đa biếnIBM SPSS 29Mở bài học gốc trên SachKTL
4.4Thống kê theo nhómIBM SPSS 29, R 4.xMở bài học gốc trên SachKTL
4.5Tạo bảng tần suấtIBM SPSS 29Mở bài học gốc trên SachKTL
4.6Tạo bảng chéoIBM SPSS 29, R 4.xMở bài học gốc trên SachKTL
4.7Dữ liệu đa lựa chọnIBM SPSS 29Mở bài học gốc trên SachKTL