Preface#
Welcome to 340.700 Stata Programming II (Intermediate).
Should you have inquiries about 340.600 Programming I (Basic), please do not hesitate to reach out to your Analytic Mentor. For those curious about Stata Programming III (Advanced), we regret to inform you that no offering will be available this year. Nevertheless, you can explore content pertinent to advanced Stata Programming here.
The Intermediate
class adopts a hybrid format to accommodate both in-person attendees at the Bloomberg School’s Wolfe E2014 (Sommer Hall) and virtual participants via Zoom (link). We encourage in-person participants to also connect to Zoom, facilitating code sharing and collective debugging, a highlight of the learning experience as described by last year’s students.
In contrast, solely in-person formats without a Zoom option hinder students’ ability to express their challenges, complicating collective problem-solving.
Our class structure is as follows:
Class: Tuesday, 4:00-5:00pm lecture
Labs: Hybrid, Room TBA, Zoom link here
HW: Sets for Weeks [1, 2, 3], [4, 5], and [6, 7]
We will evaluate your progress weekly:
A graded homework every week for more immediate feedback
Week 1-3 content equals HW 1 from prior years
Week 4-5 content equals HW 2 from prior years
Week 6-7 content equals HW 3 from prior year ds
An optional assignment at the class’s end
Complete and timely homework submission guarantees at least a B grade
For general inquiries about Course logistics, etc., please use the CoursePlus Discussion Forum. For confidential matters (e.g., grades), email your course team directly.
Join our new Stata-focused discussion community on GitHub for all your code-related queries! Whether you’re looking to share snippets, troubleshoot issues with your peers, or dive into broader discussions within the Hopkins Stata community, GitHub is your go-to platform. Don’t have a GitHub account yet? No worries—it’s quick and easy to sign up. This platform not only facilitates collaboration with your classmates and instructors but also connects you to the wider Stata-using community at Hopkins even after completion of this course. Get ready to enhance your coding journey by tapping into the collective wisdom and insights available right at your fingertips.
Zoom etiquette is straightforward: all participants will be muted except the lecturer. Feel free to ask questions via chat, which we’ll monitor regularly. During class, labs, and homework attempts, post questions and comments on the Stata-focused discussion community on GitHub for peer reference. While we aim to record lectures, live attendance is recommended when possible.
Regarding academic integrity, we encourage the use of small code snippets from books, the internet, or peers, provided they’re cited, as shown below:
tokenize `c(ALPHA)' // Adapted from https://www.statalist.org/forums/forum/general-stata-discussion/general/1380433-creating-a-counter-with-alphabets
Leveraging AI, including ChatGPT, as a co-pilot, guide, or assistant, is strongly encouraged both during and after this course. Learn More
Table of Contents#
- 1. Philosophy, overview, directory, simulation
- 2. Return values, macros, programs
- 3. Program syntax, _request(), and prompt-based programming
- 4. Intermediate file management: from a remote location
- 5. Review of Weeks 1 - 4
- 6 GitHub Repository for Collaboration
- 7. Survival analysis: non-parametric, semi-parametric, parametric
- 8. Finesse project website, reduce clutter, ensure reproducibility
- Quick References