Skip to content

Instantly share code, notes, and snippets.

@bbdaniels

bbdaniels/posty.do

Created Feb 4, 2021
Embed
What would you like to do?
Arbitrary Monte Carlo dataset with -post- in Stata
sysuse auto.dta , clear
levelsof foreign, local(levels)
tempfile posty
postfile posty str10(a) b c d using `posty' , replace
foreach level in `levels' {
local l : label (foreign) `level'
post posty ("`l'") (2) (3) (4)
}
postclose posty
use `posty' , clear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment