SuperAPI AI Directory

er-data-sample

Data & analytics

View repository

Updated 10-15 20:08

About this skill

Data and Sample (er-data-sample)

Trigger Timing

  • The main text has a "Data and Sample" section but only writes one sentence: "Data come from public sources" and "The sample is A-share listed companies"
  • The variable definition table uses textual descriptions ("reflects tax burden deviation") rather than giving calculation formulas
  • The means/extremes in the descriptive statistics table look odd, but the main text does not explain them
  • How the sample was filtered from the raw database to the regression sample is something even you cannot explain clearly, let alone have reviewers reproduce
  • Reviewers question: Is measuring the core variable this way reasonable? Is the sample representative? Is there selection bias?

Supporting code:resources/code/stata/01_clean.do(cleaning + filtering with a trace), resources/code/stata/02_descriptive.do(descriptive statistics + variable table). Every sample filtering step must be reproducible in code, corresponding to er-reproducibility。

Data Description Paragraph Standards

The first paragraph at the beginning of "Data and Sample" is about 200 words,fixed four blocks: time span + database (named) + sample scope + N; screening criteria; winsorization; multi-source merge keys. Template:

本文使用 2008—2022 年中国 A 股上市公司年度数据,财务数据来自国泰安(CSMAR)
数据库,专利数据来自中国研究数据服务平台(CNRDS),城市层面变量取自《中国城市
统计年鉴》。样本筛选:(1)剔除金融业(证监会行业 J 门类);(2)剔除 ST、*ST 及
退市公司;(3)剔除核心变量缺失的观测;(4)剔除资产负债率大于 1 的异常样本。最终
得到 2,841 家公司、共 28,317 个公司—年度观测的非平衡面板。为消除极端值影响,对所有
连续变量在上下 1% 分位进行缩尾(winsorize)处理。多源数据以「股票代码 + 年份」为
键合并,公司与城市数据按公司注册城市代码匹配。
  • The database must benamed: CSMAR, Wind, CNRDS, Chinese Industrial Enterprises Database, China Customs Database, National Tax Survey, CHFS, CHARLS, CFPS. For microsurvey data, note the survey year and sampling frame.
  • Taboo: writing "data come from public sources" or "relevant databases." Reviewers cannot judge the measurement basis from this, which is equivalent to saying nothing.
  • For the time span, give thestart and end rationale(such as the policy implementation year or the data availability cutoff year); do not just throw out an interval.

Variable Definition Table Standards

Each variablehas exactly one row; the definition gives thecalculation formularather than a textual description; the data source isprecise to the database name. Arrange in four categories: dependent variable / core explanatory variable / control variables / instrumental variable.

Category Variable Symbol Definition (Calculation Formula) Data Source
Dependent variable Corporate tax avoidance BTD =(pre-tax accounting profit − taxable income)/total assets at period end CSMAR financial statements
Core explanatory variable Tax enforcement intensity Enforce =actual tax burden−expected tax burden (industry-region regression residual) National Tax Survey
Control variable Firm size Size =ln(total assets at period end) CSMAR
Control variable Debt-to-asset ratio Lev =total liabilities / total assets CSMAR
Instrumental variable Policy shock IV_reform =1 if registered after the 2002 income tax sharing reform, otherwise 0 Manually compiled by the authors
  • Write formulas:=实际税负-预期税负,do not writedescriptions such as "reflects tax burden deviation."
  • For derived variables, note the upstream fields or regression source (such as "industry-region regression residual"), corresponding one-to-one with the 01_clean.do in gen .
  • The table notes should specify: winsorization basis, units, variables that are log-transformed, and the value meanings of dummy variables.

Descriptive Statistics Table Standards

ReportMean / Standard Deviation / Min / p25 / Median / p75 / Max / N; continuous variables areafter winsorizingvalues; the variable order is exactly consistent with the definition table (one-to-one correspondence).

  • Abnormal means / extreme values should beexplained in the main text: for example, the mean of the core explanatory variable is close to 0 (normal for residual-type variables), or a control variable has a relatively high maximum value (still high after winsorizing, indicating industry characteristics).
  • For dummy variables, reporting the mean gives the group proportion; point out in the main text whether the sample proportions of the treatment group / control group are imbalanced.
  • If grouped (treatment vs. control, pre-reform vs. post-reform), add group means and difference tests to lay the groundwork for identification.
  • N is consistent with the final number of observations in the data description paragraph; if the N of an individual variable is relatively small, explain the source of missingness.

Sample screening trail

Each screening stepis traceable and reproducible in code, the main text provides a "funnel"-style account, and the code leaves a trail corresponding to er-reproducibility:

* 01_clean.do —— 样本筛选漏斗,每步记录剩余观测数
use "$data/raw/csmar_firm.dta", clear
count                                          // 原始:512,043
drop if inlist(ind_code,"J")                   // 剔除金融业
drop if st_flag==1                             // 剔除 ST/*ST/退市
drop if missing(btd, enforce, size, lev)       // 剔除核心变量缺失
drop if lev>1 & !missing(lev)                  // 剔除资不抵债异常
winsor2 btd enforce size lev, cuts(1 99) replace  // 上下 1% 缩尾
count                                          // 最终:28,317
  • The main text explains whether it isan unbalanced panel or a balanced panel, and why (if strong balancing would lose a large number of samples, explain).
  • Multi-source merge reportingmatch rate: for example, "patent data successfully matched 26,108 observations, with a match rate of 92.2%; unmatched observations are mainly firms with no patent applications in the given year."
  • Write clearly the merge keys and definitions (stock code vs. full company name vs. unified social credit code); inconsistencies in definitions across databases must be explained with cleaning rules.

Prevention of frequent reviewer challenges

  • Reasonableness of measurement: Why is the core variable calculated this way? Give literature support (e.g., a certain algorithm originates from a certain author, year) + at least 1 alternative measure reserved for robustness (corresponding to er-robustness).
  • Sample representativeness: the sample's proportion of the population, whether the industry / region / year distributions are skewed; if a subsample is used (e.g., only manufacturing), argue that it does not harm external validity or clearly define the boundary of the conclusions.
  • Selection bias: whether screening systematically excludes a certain type of firm (e.g., whether deleting missing values is related to the dependent variable); when necessary, report Heckman two-step / mean comparison with the full sample, anticipating rather than waiting for reviewers to ask.

Must-check list

  • The data description paragraph names specific databases (do not write "public channels"), includes the start and end of the time span with reasons + final N
  • All four blocks are present: database + scope + N, screening criteria, winsorizing definitions, merge keys
  • The variable definition table has one row per variable, with definitions ascalculation formulas, sources precise to the database name, and four categories of grouping
  • Descriptive statistics include mean / standard deviation / quantiles / N, and continuous variables are after winsorizing
  • Abnormal means / extreme values are explained in the main text
  • The variable order in descriptive statistics is consistent with the definition table, and N is consistent with the data paragraph
  • The sample screening funnel can be reproduced in 01_clean.do , with the remaining number of observations at each step documented
  • Explain unbalanced / balanced panel, and report match rates for multi-source merges
  • Core variable measurement has literature support + alternative measures; sample representativeness and selection bias have been anticipated

Anti-patterns

  • Vague data sources: "data from public channels", "relevant databases", "Wind, etc." — must name the specific database
  • Variable definitions are described in words ("reflects the firm's level of innovation") without giving formulas
  • Descriptive statistics show clearly abnormal means / extreme values but no explanation is given, leaving doubts for the reviewers
  • Screening criteria are opaque: only saying "after screening, N samples were obtained," with no funnel and code that cannot be reproduced
  • For winsorization, only saying "processing was done" without giving percentiles (1%/99%? 5%/95%?)
  • The variables in the descriptive statistics and the variable definition table do not correspond, and the Ns do not match
  • The same variable is repeatedly redefined in the main text (in the theory, mechanism, and robustness sections), and the definitions even contradict one another

Output format

【数据说明段落】四块齐全 / 缺:[库点名 / N / 筛选 / 缩尾 / 合并键]
【数据库点名】具体(CSMAR / CNRDS / ...)/ 含糊待改:[...]
【变量定义表】公式化且四类分组 / 问题:[某变量用描述/缺来源/缺类别]
【描述统计】合规(缩尾后, 含分位数)/ 异常未解释:[变量]
【表—文呼应】一致 / 不一致:[顺序 or N 对不上]
【筛选留痕】漏斗可复现 / 不透明:[缺步骤]
【面板与匹配】非平衡/平衡 已交代 + 匹配率 X% / 缺
【质疑预防】度量依据 / 代表性 / 选择偏误:[已备 / 待补]
【下一步】数据与样本扎实 → er-identification 落识别策略与主回归

References

  • Citations use the author–year system; in-text citations are like (Fan Ziyang, Tian Binbin, 2013), and the [1][2] / [J][M] numbered system is not used.

Supplementary resources