Skip to content

Instantly share code, notes, and snippets.

@Andrei-WongE
Created September 12, 2022 21:44
Show Gist options
  • Save Andrei-WongE/5505008386a97a2b368e1ba13eff7d21 to your computer and use it in GitHub Desktop.
Save Andrei-WongE/5505008386a97a2b368e1ba13eff7d21 to your computer and use it in GitHub Desktop.
Generic header for Stata
///-----------------------------------------------------------------------------
/// Project: []
/// Creation date: [YYYY-MM-DD]
/// Last modification: []
/// Author: [], [email]
///-----------------------------------------------------------------------------
///-----------------------------------------------------------------------------
/// Program Setup
///-----------------------------------------------------------------------------
version [] // Set Version number for backward compatibility
set more off // Disable partitioned output
clear all // Start with a clean slate
set linesize 80 // Line size limit to make output more readable
macro drop _all // clear all macros
set scrollbufsize 2048000 // Scroll up as far as possible in results window
capture log close // Close existing log files
log using [name].txt, text replace // Open log file
///-----------------------------------------------------------------------------
///-----------------------------------------------------------------------------
/* RUNS THE FOLLOWING:
1.SET-UP
2.[]
*/
///-----------------------------------------------------------------------------
*********************************************************************************
* Part. 1.Set-up *
*********************************************************************************
//Set directory
global base "[]"
cd "$base"
global output "[]"
global figures "[]"
gloval data "[]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment