Stata Blogger?

Are you a Stata blogger? Join the aggregator!

Executing do-files from text editors

| Gabriel | Stata now defaults to opening a do-file in the integrated do-file editor rather than just running it. The integrated do-file editor is now pretty good, but I’m a creature of habit and I prefer to use an external text editor (usually TextMate) then pipe to Stata. The current default behavior makes this […]

Continue reading Executing do-files from text editors

Data storage type matters

Despite most sources tell that the storage type in stata should not matter, it is worth checking whether this is the case for your dataset. I just came across a situation where two identically constructed datasets (one stored in default type (float) and one stored in double) generated different output. Also before that i encountered […]

Continue reading Data storage type matters

make error caps with stata

rename var1 race rename var2 ses rename var3 write collapse (mean) meanwrite= write (sd) sdwrite=write (count) n=write, by(race ses) generate hiwrite = meanwrite + invttail(n-1,0.025)*(sdwrite / sqrt(n)) generate lowrite = meanwrite – invttail(n-1,0.025)*(sdwrite / sqrt(n)) generate sesrace = race if ses == 1 replace sesrace = race+3 if ses == 2 replace sesrace = race+6 [...]

Continue reading make error caps with stata