Increasing memory usage after repeated margins calls in Stata
Goal: Determine whether the memory increase observed after repeated calls to the margins command in Stata reflects a true leak or expected caching of intermediate results, and whether clearing that memory requires a manual Mata workspace reset. Constraints: Reports differ across Stata versions; Stata 18 changed internal memory‑management for margins, but cer