Stata Code Examples

A collection of commands for Stata, LaTeX, and other programming languages

Reproducible research in Stata

Stata output as a PDF

cd "f:\some\path\" log using log_file_name, replace . . (do some work; produce a graph) . . roccomp sepsis logodds_a logodds_b logodds_ab, summary name(some_graph) . . graph export some_graph.pdf, replace . . log close translate log_file_name.smcl log_file_name.pdf

About

. about

Stata/IC 13.1 for Windows (64-bit x86-64) Revision 19 Dec 2014 Copyright 1985-2013 StataCorp LP

Total physical memory: 4191800 KB Available physical memory: 1736860 KB

Single-user Stata perpetual license: Serial number: 301306207433 Licensed to: Dale Plummer Vanderbilt

.

How to draw maps with Stata

In Stata, how to display p-value to higher precision after a regression

* * Run the regression. * poisson total_cost post, exposure(count) irr * * Display p-value to higher precision. * local z=_b[post]/_se[post] disp `z' local p=2*normal(-abs(`z')) disp "p=`p'" * * Here is another way to display to higher precision. * estimates table, p(%12.10g)

Running Stata as a batch job

$ cd dirname
$ nohup stata -b do mydofile &

Getting Started with R for Stata Users

Edit | Attach | Print version | History: r4 < r3 < r2 < r1 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r1 - 06 Mar 2015, DalePlummer
 

This site is powered by FoswikiCopyright © 2013-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki? Send feedback