← Back to Data Management Pillar

Data Management Guide Index

All 27 guides in this category.

merge in Stata: 1:1, m:1, 1:m with Match Audits

13 min read

Use merge stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

reshape in Stata: Wide to Long and Back with Repeatable Patterns

17 min read

Use reshape stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

import excel in Stata: Clean Types, Headers, Ranges, and Dates

13 min read

Use import excel stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

append in Stata: Stack Datasets Safely with Variable Alignment Checks

13 min read

Use append stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

collapse in Stata: Group Summaries Without Losing Design Integrity

17 min read

Use collapse stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

egen in Stata: Group IDs, Totals, Ranks, and Practical Cookbook Patterns

17 min read

Use egen stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

encode vs egen group() in Stata: Correct Category IDs for Modeling

17 min read

Use encode stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

Stata Dates: daily(), %td, %tm, and Import Trap Fixes

17 min read

Use stata date format in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

Missing Values in Stata: ., .a-.z, and Safe Recode Rules

13 min read

Use missing values stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

bysort in Stata: Reusable Within-Group Transform Patterns

13 min read

Use bysort stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

Duplicates in Stata: report/list/drop with an Audit Checklist

13 min read

Use duplicates drop stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

tostring in Stata: Convert Without Breaking IDs and Merges

13 min read

Use tostring stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

recode in Stata: Safer Category Edits and Missing Handling

13 min read

Use recode stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

Value Labels in Stata: label define, label values, and Label Hygiene

13 min read

Use label values stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

keep/drop in Stata: Subset Data Without Accidental Loss

13 min read

Use keep drop stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

joinby in Stata: Many-to-Many Matching with Explicit Audits

17 min read

Use joinby stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

Range Joins in Stata: Match Rows Within Date and Value Intervals

21 min read

Use rangejoin stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

merge keepusing() and keep(match) in Stata: Cleaner Joins

17 min read

Use merge keepusing stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

xtset in Stata: Panel IDs, Time Variables, and Gap Pitfalls

17 min read

Use xtset stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

tsset in Stata: Time-Series Setup, Formats, and Duplicate Times

17 min read

Use tsset stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

Sorting in Stata: sort, gsort, stable, and Tie Handling

17 min read

Use sort stable stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

Unique IDs in Stata: egen group(), isid, and Key Discipline

17 min read

Use egen group stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

isid in Stata: Enforce Key Uniqueness and Repair Failures

17 min read

Use isid stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

contract in Stata: Frequency Tables You Can Merge Back

17 min read

Use contract stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

tabulate in Stata: One-Way, Two-Way, Missing, and Percentages

13 min read

Use tabulate stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

summarize, detail in Stata: Percentiles, Skewness, and Checks

13 min read

Use summarize detail stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.

import delimited in Stata: CSV Imports Without Type Breaks

13 min read

Use import delimited stata in Stata with full runnable code, realistic panel variables, and QA checks before downstream estimation.