No matter how experienced you are in statistical programming, you are certain to encounter errors in your code from time to time. You will recognize some of them and be able to solve them quickly, but you will never stop encountering unexpected new errors that you need help to resolve. Asking for help with statistical programming is hard. You need to give enough information to the person helping you so that they can produce the exact same problem you have
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local nb=`.Graph.plotregion1.barlabels.arrnels' | |
| forval i=1/`nb' { | |
| di "`.Graph.plotregion1.barlabels[`i'].text[1]'" | |
| .Graph.plotregion1.barlabels[`i'].text[1]="`.Graph.plotregion1.barlabels[`i'].text[1]'%" | |
| } | |
| .Graph.drawgraph |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \usepackage{pdfpages} % Allow PDF insert for non-TeX elements | |
| \includepdf[noautoscale=true, pages=1]{pdf/15633-Analytics_coverFINAL_print.pdf} | |
| \includepdf[noautoscale=true, pages=2]{pdf/15633-Analytics_coverFINAL_print.pdf} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sysuse auto.dta, clear | |
| local style "s(0) w(1) lc(none) discrete frac" | |
| tw /// | |
| (histogram rep78 if foreign == 1 /// | |
| , fc(black%50) barwidth(0.9) `style') /// | |
| (histogram rep78 if foreign == 0 /// | |
| , fc(red%50) barwidth(0.8) `style') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Regression margins visualizer | |
| cap prog drop regmargins | |
| prog def regmargins | |
| // Syntax command | |
| syntax anything | |
| // Expected syntax is like regress | |
| // Second entry should be factor variable (i.) and we will visualize levels |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" page-range-format="chicago" demote-non-dropping-particle="sort-only"> | |
| <!-- This style was edited with the Visual CSL Editor (https://editor.citationstyles.org/visualEditor/) --> | |
| <info> | |
| <title>American Political Science Association</title> | |
| <title-short>APSA</title-short> | |
| <id>http://www.zotero.org/styles/american-political-science-association</id> | |
| <link href="http://www.zotero.org/styles/american-political-science-association" rel="self"/> | |
| <link href="http://www.apsanet.org/media/PDFs/Publications/APSAStyleManual2006.pdf" rel="documentation"/> | |
| <author> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Selection bias for normally-distributed effect with choice | |
| // Setup | |
| qui { | |
| clear all | |
| cls | |
| version 13 | |
| // Reproducibility with bit.ly/stata-random | |
| set seed 422698 // Timestamp: 2021-01-22 16:41:57 UTC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ** | |
| cap prog drop gtrans | |
| prog def gtrans , rclass | |
| syntax anything | |
| preserve | |
| qui { | |
| local theText = subinstr("`anything'"," ","%20",.) // HTML for whitespace | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| convert -delay 20 -loop 0 *.png output.gif |