noobjordan.blogg.se

Stata label define
Stata label define








  1. Stata label define code#
  2. Stata label define download#

More or less, it is a quick shot for XML parsing, specialized on this very specific XML DDI file.

Stata label define code#

It's not the most efficient or elegant code snippet I have ever produced, sorry. So I sat down to produce some example code. This plaintext XML file contains all we need, so we can read this into Stata (with - file-, as Daniel demonstrated), and label everything accordingly.

Stata label define download#

Surfing around on the data provider's website, I found that they provide a DDI (1.2.2 - this is a quite old format) metadata file for download in the section " Study Description -> Download Metadata". Sorry, this will get a little excessive now. After I read his solution, I followed the hyperlink Anustup Kundu posted in #9. I fully agree with daniel klein that it would be best to save the metadata (value labels etc) to a plain text file, and parse it afterwards. I stumbled upon this post about two hours ago. House rent, garage rent (imputed- urban only)Ĭonsumer taxes and cesses: sub-total (540-541) Petrol, other fuels & lubricants for vehicle Other consumer services excluding conveyanceĬonsumer services excluding conveyance: sub-total (480-496)

stata label define

Goods for personal care and effects: sub-total (440-445)īucket, water bottle/ feeding bottle & other plastic goods Other goods for personal care and effects Medical – non-institutional: sub-total (420-428) for example, can stata read a codebook somehow and label them accordingly? I want to know if there is a smarter way how I can approach this.

stata label define

Label define B3_q10 1 "pucca" 2 "semi pucca" 3 "serviceable katcha" 4 "unserviceable katcha" 5 "no structures" Label define B3_q5 1 "Hinduism" 2 "Islam" 3 "Christianity" 4 "Sikhism" 5 "Jainism" 6 "Buddhism" 7 "Zoroastrianism" 9 "others" Labelling them in the manner below manually would be quite demanding However B5_q1 has values 100,101,102.,339 signifying different food for example 100 signifies rice 101 signifies potato 102 signifies radish, etc.ī10_q1 has values 420,421,422.,549 signifying expenditure on various things such as 420 signifies medical expense, 430 signifies movies expense, etc. Input byte(B3_q5 B3_q10) int(B5_q1 B10_q1)ī3_q5=religion having values Hinduism-1, Islam-2, Christianity –3, Sikhism-4, Jainism-5, Buddhism-6, Zoroastrianism-7, others-9ī3_q10= type of house structure: pucca-1, semi-pucca-2, serviceable katcha –3, unserviceable katcha – 4, no structure-5










Stata label define