#+TITLE: Quantitative :academia:UoN:@personal:
#+FILETAGS: :atomic:note:

* Quantitative :academia:UoN:@personal:
:PROPERTIES:
:CREATED: 96b29f31-f1b6-4d93-a8fc-8d3cc86053fa
:SOURCE: /home/user/memex/daily/2016-10-17.org
:END:

:CREATED: [2016-10-17 Mon 12:22]
:MODIFIED: [2016-10-17 Mon 13:41]
:IMPORTED: [2023-02-08 Wed 19:22]

Stata /SE14.2

Comments start with *

label variable id "id of respondent" // label a variable

codebook gender // displays the codebook

label define genderlab 1 "Female" 2 "Male" // names values to genderlab values

label values gender genderlab // links gender to genderlab

set more off

describe //describes the dataset

codebook //displays the entire codebook

mvdecode _all, mv(-9=.) //decoding missing values

recode gender (1=1) (2=0), into(female)

drop female

recode gender (1=1) (2=0), gen(female)

label variable female "female dummy variable"

label define femalelab 0 "Male" 1 "Female"

label value female femalelab

drop female

recode gender (1=1 "Female") (2=0 "Male"), into(female)// Single step

tab female gender // tabulates


* Backlinks
- Source: [[file:/home/user/memex/daily/2016-10-17.org][2016-10-17.org]]
