COMM 205 Study Guide - Final Guide: Stata

127 views3 pages
School
Department
Course

Document Summary

Structure: command varname(s) [if varname == value] [, options] // don"t actually include. // [ and ] tab varname(s) [if varname==value] Usually used for categorical variables, produces distribution table of each case in in a variable. Can add options, like sort to sort the results tab loc if fyear==2012, sort. Tabulate and summarize together tab [categorical variable], sum([numerical variable]) produces a summary for each categorical var tabulated. Generate(gen): gen [type] newvar = (expression | value) [if] . If no if statement or other expression is used, can assign same value for that variable for every observation in the data set gen newvar=10. To open and clear existing dataset: use [**filepath here**] , clear. Replace(raplace): replace var = [value] if [conditional] ex gen na = 1 if loc== usa | loc== can | loc== mex replace na = 0 if na != 1.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers