Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generates Stata code for accounting research models (accruals, earnings management, value relevance) using Compustat data.
27% 55%+27 ptsof test cases passed
Passed 12 of 22 test cases with the skill, and 6 of 22 without it.
3 of 3 safety checks passed
Not used yet
Generate publication-ready Stata code for empirical accounting research. This skill covers the standard econometric models, variable constructions, and estimation procedures used in top accounting journals (TAR, JAR, JAE, RAS, CAR).
Empirical accounting research has developed a distinctive set of analytical conventions that differ from general econometrics. Researchers work with financial statement data from databases like Compustat and CRSP, construct standardized proxies for earnings quality, accruals, and discretionary behavior, and employ estimation techniques that address the particular endogeneity concerns in archival accounting studies.
This skill provides the Stata implementation for the most commonly used models in accounting research: accrual models (Jones, Modified Jones, performance-matched), earnings management detection, value relevance studies, audit quality analyses, and corporate governance research. Each model includes the variable construction from raw Compustat items, the estimation procedure, and the table formatting expected by accounting journal reviewers.
The code follows the conventions established in influential methodological papers by Dechow, Sloan, and Sweeney (1995), Kothari, Leone, and Wasley (2005), and Ecker, Francis, Kim, Olsson, and Schipper (2006), ensuring alignment with reviewer expectations at major accounting journals.
* ============================================
* Standard Compustat Variable Construction
* ============================================
* Load Compustat annual data
use "raw/compustat_annual.dta", clear
* Fiscal year identifier
gen fyear = year(datadate)
* Key financial variables (Compustat mnemonics)
* Total accruals (balance sheet approach)
gen total_accruals_bs = (dch_act - dch_che) - (dch_lct - dch_dlc - dch_txp) - dp
replace total_accruals_bs = total_accruals_bs / l.at // Scale by lagged assets
* Total accruals (cash flow approach, preferred)
gen total_accruals_cf = (ib - oancf) / l.at
* Key ratios
gen roa = ib / l.at // Return on assets
gen leverage = (dltt + dlc) / at // Financial leverage
gen size = ln(at) // Firm size (log assets)
gen mb = (prcc_f * csho) / ceq // Market-to-book
Published skills whose descriptions closely match this one, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.