Class Notes (1,100,000)
US (490,000)
UMD (9,000)
GVPT (200)
wlr (7)
Lecture 1

GVPT 100 Lecture Notes - Lecture 1: Standard Deviation, Working Directory, Plain Text

Government and Politics
Course Code
GVPT 100

of 3
GVPT100 1/28/2015 in class notes
Introduction to STATA
I. types of files that you are going to encounter
a. programs will look for data and read the data files into the program
b. you will be able to manipulate the data and record what comes out of
descriptions in log file
i. log file allows you to keep history and notes of results of what
you’ve done
c. .dta file
i. binary file (won’t be able to read it in any other program)
d. .ado
i. programs (not binary)
e. .do
i. your command files (not binary)
f. find files in two different ways
i. type in command that tells stata this is where this file is located
ii. open a menu and search through till you find that file
g. four relevant parts of home screen
i. variables
ii. results
1. shows everything stata tells you about data
2. anything you log will be recorded in this window
iii. review
iv. commands
1. three ways to make stata do what you want it to do
a. interactive use
i. command window
1. use data, clear (ex. Use nes2008.dta,
a. find this file and then clear
everything out of my memory
ii. pull down menu
b. batch use
h. different variables you can have
i. string variable (ex. What is your name)
ii. numerical variable (how old are you)
II. First thing you want to do when you download STATA
a. Type: update all
b. Working directory
i. Create working directory for GVPT100 so that stata knows to look
directly in that folder for data
III. Reading the data (interactive use)
a. What is in this new folder
b. ls: list
c. .dta is already in STATA format
d. summarize
i. tell you the variable, the mean, the standard deviation, the
minimum and the maximum of the variable
IV. visualize the data
a. type the command edit: will bring up a window that looks like an excel
spreadsheet where you can look at and edit the data
b. first thing to know in a data file: what is the unit, what is the line of data
i. the unit is key. Describes what type of predictions we can make
V. Batch use
a. Creating a .do file
i. Plain text file which you can write commands into
ii. Even though .do is a little harder to get good with, push yourself to
learn it so that your not just using pull down menus for everything.
This helps you to keep track of what your doing better
b. Log: creates log of whatever you’ve done
i. Helps keep track of what you’ve done