Research
- Crime Categories
- Murder Circumstances
- Charges
- Murder Numbers by SHR
- Definitions of Murder
- Crime Literature
- Other Literature
- Seminars
- Journal Ranking
- Laws
- Changes in Law and Reporting in Michigan
- Citation Guides
- Datasets
Writing
Methods
- BLP
- Econometrics Models
- Econometrics Tests
- Econometrics Resources
- Event Study Plots
- Metrics Literature
- Machine Learning
Python-related
- Python Basic Commands
- Pandas Imports and Exports
- Pandas Basic Commands
- Plotting in Python
- Python web scraping sample page
- Two Sample t Test in Python
- Modeling in Python
R-related
- R Basics
- R Statistics Basics
- RStudio Basics
- R Graphics
- R Programming
- Accessing MySQL Databases from R
Latex-related
Stata-related
SQL
Github
Linux-related
Conda-related
AWS-related
Webscraping
Interview Prep
Other
Stata Labels
It is possible to assign the same label for multiple variables. Check out the following example:
Initially these variables don’t have labels.
We can make a label:
label define charge 0 "capital murder" 1 "first degree murder" ///
2 "second degree murder" 3 "third degree murder" ///
4 "voluntary manslaughter/non-negligent - manslaughter 1st" ///
5 "accessory to murder" 6 "accessory after the fact" ///
7 "conspiracy to murder (includes solicitation to murder)" ///
8 "attempted murder" ///
9 "use of firearm (includes felony f/a, possession of f/a)" ///
10 "aggravated battery (includes assault with a weapon)" ///
11 "sexual assault" 12 "robbery" 13 "burglary" 14 "arson" ///
15 "kidnapping" 16 "prostitution" ///
17 "other felony (includes escape and evidence tampering)" ///
18 "misdemeanor" 19 "career criminal enhancement" ///
20 "felony drug" ///
21 "use of a dangerous weapon (other than a firearm)" ///
22 "involuntary manslaughter/negligent - manslaughter 2nd" ///
23 "reckless driving (hit and run)" ///
24 "driving under the influence" ///
25 "vehicular manslaughter" 26 "child abuse" ///
27 "child abuse with death (Albuquerque only)" ///
28 "larceny/grand theft (includes auto theft)" ///
29 "old age enhancement" 30 "careless use of a firearm" ///
31 "reckless endangerment of another person" ///
32 "attempted manslaughter" 33 "misd. drug" 34 "unknown" ///
35 "armed violence (Chicago)"
And then assign it to the variables:
label values charg* charge
So that all the variables that start with charg will have this variable label.
To see the value label, use
label list charge