stata export for metadata documentation
play

Stata export for metadata documentation Munich, 26.05.2019 Anne - PowerPoint PPT Presentation

Stata export for metadata documentation Munich, 26.05.2019 Anne Balz, Klaus Pforr, Florian Thirolf Motivation German Microdata Lab (GML) offers Metadata for various official microdata online Goal: extract Metadata from these Datasets


  1. Stata export for metadata documentation Munich, 26.05.2019 Anne Balz, Klaus Pforr, Florian Thirolf

  2. Motivation � German Microdata Lab (GML) offers Metadata for various official microdata online � Goal: extract Metadata from these Datasets automatically and import them into our database � German Microcensus � European Labour Force Survey � EU-SILC (European Union Statistics on Income and Living Conditions) 2

  3. Microdata-Informationsystem MISSY � Online plattform („MISSY-web“) � Documentation of official microdata (European & national) � Documentation on different levels: � study � question � variable 3

  4. Microdata-Informationsystem MISSY 4

  5. Microdata-Informationsystem MISSY 5

  6. ado dta2md core functionality

  7. core functionality *.dta output.* 7

  8. core functionality *.dta dta2meta.ado meta.dta meta2*.ado output.* 8

  9. ado dta2md ado dta2md

  10. ado dta2md *.dta dta2meta.ado meta.dta meta2*.ado output.* 10

  11. the meta-file All necessary (meta-)information in a table format: � Variable level � Varname, -label � Summary statistics (min, max, mean, std) � Value level � Value, - label � Frequencies and percentages � Overall � For groups (e.g.: countries) 11

  12. ado dta2md User Input (Variable): Group-Variable & Computed Variable Level Value Level Technical: First Value within Variable 12

  13. the meta-file … 13

  14. the meta-file … 14

  15. ado dta2md 15

  16. ado dta2md dta2md input(filename) output(filename) // freqvarlist(varlist) // [group(varname) // missingdef(string) smissingdef(string) // replace ] dta2md input($path/micro_file.dta) output($path/meta_file.dta)// freqvarlist(var1 var2 var3) // group(country) // missing("X<0") // smissingdef(`"X="invalid answer"| X="did not understand""') // replace 16

  17. ado dta2md If computed: If group specified: Loop over all groups Loop over all levels (within levels of vars) (within all vars) Loop over all vars If group specified: Loop over all groups 17

  18. ado dta2md ado meta2DDI

  19. ado meta2DDI *.dta dta2Meta.ado meta.dta meta2DDI.ado DDI2.5.xml 19

  20. ado meta2DDI � Uses the ‚ file‘ command � ‚forvalues‘ to run through all categories � variables of the meta- file are used to form hierarchical output � example: � ‚first‘ (0/1) tags first category of a variable � used to generate output on variable level 20

  21. ado meta2DDI 21

  22. ado meta2DDI 22

  23. ado dta2md usecase MISSY

  24. Usecase MISSY *.dta dta2Meta.ado meta.dta meta2sql.ado getUUIDs generateUUIDs output.sql mapRelations Database 24

  25. meta2sql.ado � ‚ file‘ command is used � different frame � ‚forvalues‘ for each database-table 25

Recommend


More recommend