Git Product home page Git Product logo

stata-fundamentals's Introduction

D-Lab Stata Fundamentals Workshop

Datahub

This repository contains the materials for D-Lab Stata Fundamentals workshop. Please refer to the Stata Fundamentals Google Slides for the accompanying material to this workshop.

Workshop Goals

This workshop is a three-part introductory series that will teach you Stata from scratch with clear introductions, concise examples, and support documents. You will learn how to download and install the Stata software, understand data and basic manipulations, import and subset data, explore and visualize data, and understand the basics of automation in the form of loops and functions. After completion of this workshop you will have a foundational understanding to create, organize, and utilize workflows for your personal research.

Each of the parts is divided into a lecture-style coding walkthrough interrupted by challenge problems, discussions of the solutions, and breaks. Instructors and TAs are dedicated to engaging you in the classroom and answering questions in plain language.

Part 1: Introduction

  • Loading datasets into Stata (no previous knowledge expected)
  • Examining a dataset and finding variables of interest
  • Summarizing and tabulating variables
  • Stata specific tools and resources (do files, logs, help files, etc.)
  • Coding and cleaning data (making new variables from old variables; labeling variables and values, etc.)
  • Using logical operators in Stata
  • Cross-tabulations

Part 2: Data Analysis in Stata

  • Correlation
  • T-tests
  • Ordinary Least Squares (OLS) and logistic regression (basic syntax, using interaction terms, interpreting output)
  • Visualization (histograms, bar graphs, scatter plots)
  • Regression postestimation (getting predicted values, basic graphs)
  • Merging and appending datasets

Part 3: Stata Programming

  • Local and global variables (macros)
  • Looping (foreach, forvalues)
  • Reshaping data between wide and long formats
  • Recalling and using command output
  • Generating nicely formatted journal-style tables

Installation Instructions

In preparation for the upcoming workshop, you will need to install Stata and download the workshop materials.

  1. Download & Install Stata: To download the installation materials, please visit the Stata website. The credentials you need to enter will be emailed to you prior to the start of the workshop. For assistance with installation, you may view the Stata installation guide.

  2. Install the Stata License: The Stata license will be provided to you in your calendar invitation once your register for the workshop. If you currently have Stata installed, you do not need to reinstall Stata. However, if you would like to use the trial license we are providing for Stata17MP, feel free to install it. Please do not share this license and note that the license is a trial and will expire later next month.

  3. Download the Workshop Materials: The workshop materials can be obtained from this GitHub repository.

    • Click the green "Code" button in the top right of the repository information.
    • Click "Download Zip".
    • Extract this file to a folder on your computer where you can easily access it (we recommend Desktop).

We will take a few minutes at the start of the workshop to make sure everyone has Stata installed and the workshop materials downloaded. Please feel free to email or visit the D-Lab Front Desk if you have any questions.

Is Stata not Working on Your Computer?

If you have a Berkeley CalNet ID, attend the workshop anyway, where we can provide you with a cloud-based solution by using the UC Berkeley Library Citrix Service for campus' shared Stata licenses.

Additional Resources

Check out the following resources to learn more about Stata:

  1. Stata book recommendations
  2. External Stata tutorials
  3. Stata at Berkeley

About the UC Berkeley D-Lab

D-Lab works with Berkeley faculty, research staff, and students to advance data-intensive social science and humanities research. Our goal at D-Lab is to provide practical training, staff support, resources, and space to enable you to use R for your own research applications. Our services cater to all skill levels and no programming, statistical, or computer science backgrounds are necessary. We offer these services in the form of workshops, one-to-one consulting, and working groups that cover a variety of research topics, digital tools, and programming languages.

Visit the D-Lab homepage to learn more about us. You can view our calendar for upcoming events, learn about how to utilize our consulting and data services, and check out upcoming workshops.

Contributors

  • Renee Starowicz
  • Isabelle Cohen
  • Chris Kennedy
  • Hero Ashman

stata-fundamentals's People

Contributors

ck37 avatar henchc avatar heroashman avatar isabellemcohen avatar pssachdeva avatar rstarowicz avatar severrinn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stata-fundamentals's Issues

Color Option Errors in Stata 14

There were issues with the code for stata fundamentals II line 220-250 in Stata 14, issue was not replicated in Stata 15. Color options were not available.

Code Below:
*** More Advanced Plotting Options ***

*What if we want to put two histograms on the same plot?

**Two histograms in one
twoway (histogram wage if union==1) ///
(histogram wage if union==0)
*Hard to differentiate the bars

*Lets add some color differences and add a legend
twoway (histogram wage if union==1, color(blue)) ///
(histogram wage if union==0) , legend(order (1 "Union" 2 "Non-Union"))

*Lets change the opacity of the bars
twoway (histogram wage if union==1, fcolor(blue%50) lcolor(black)) ///
(histogram wage if union==0, fcolor(red%50) lcolor(black)), ///
legend(order (1 "Union" 2 "Non-Union"))

*Change the y axis to percentage
twoway (histogram wage if union==1, percent fcolor(blue%50) lcolor(black)) ///
(histogram wage if union==0, percent fcolor(red%50) lcolor(black)), ///
legend(order (1 "Union" 2 "Non-Union"))

*Line up bars and add a title
twoway (histogram wage if union==1, percent fcolor(blue%50) lcolor(black) start(1) width(2)) ///
(histogram wage if union==0, percent fcolor(red%50) lcolor(black) start(1) width(2)), ///
legend(order (1 "Union" 2 "Non-Union")) title("Wage by Union Status")

Automated email for installations

Specifically for downloading Stata - can no longer physically download Stata, can only access through Citrix

Also include info in Readme file to be on lookout for welcome email with temporary workshop license download info

Multiple do files - confusing

We have a multiple do file used for the session in each day's folder. We need to remove the content.do files that are not labeled 2021.
Thank you!

License

Can you please include the license.

I would like to use this for my teaching source

Polls are wrong

the polls for Stata fundamentals are loading the Git + Bash polls from another workshop.

Misspell - Part 2

married line 138 is not a categorical variable and that there is a typo in the titles of all the graphs 'survery' instead of 'survery'

confusion on install process

This google doc contains the instructions that we send to people ahead of the workshop.

Apparently there is some confusion from participants about these instructions. @melaniephillips can you reply to this thread and describe details about what confusion they had and what questions they were asking? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.