*! version 0.1 2Mar2021

help for metaxl morph

Title

metaxl morph - transforms a metadata file to eliminate redundant information

Syntax

metaxl morph
(vl_lab1 = vl_lab2 vl_lab3 ...) [(vl_lab7 = vl_lab5 vl_lab6 ...) ...],
metafile(fn)
[options]

Options
* metafile(fn) is name of the Excel file where the
metadata is stored.

save(fn [, replace]) saves the transformed metadata in the Excel file fn.xlsx.
Defaults to <option metafile>_new.xlsx.

keep keeps old sheets that were morphed into new sheets.

* required

Description

metaxl morph is a Stata command that transforms a metadata file by removing
redundant information. The command assumes that the Excel file has the structure of
the file produced by metaxl extract.

The programs acts only on value labels, merging sheets specified by the user into a new
sheet. This could be important if the metadata file contains different value label sheets
with potentially redundant information. Think about two value labels, educ_emp and
educ_man, which stand for employee and manager's level of education, respectively.
If the two value labels concern the general education level, one could eliminate these two
value label sheets and create a new one - educ for example - that applies to both
situations.

It is worth noting that once we generate a new value label sheet that is the result
of merging other sheets, the sheet variables (see metaxl extract)
also changes, so as to reflect the changes made to the value label that applies to one
or more variables.

Examples

Morph sheets vl_lab1 and vl_lab2 from file meta.xlsx into sheet
vl_lab3. Save the new metadata in morph.xlsx

. metaxl morph (vl_lab1 = vl_lab2 vl_lab3), meta(meta) save(morph)

Morph sheets vl_lab1 and vl_lab2 and vl_lab4 and vl_lab5 from
file meta.xlsx into sheets vl_lab3 and vl_lab6. Save the new meta
data in meta_new.xlsx

. metaxl morph (vl_lab3 = vl_lab1 vl_lab2) (vl_lab6 = vl_lab4 vl_lab5), meta(meta)

Warning: please note that in these examples vl_lab# stands for the name of
Excel sheet where the value label data is stored and lab# is the name of the value
label. Users must always use this syntax, since it is assumed that the metadata file follows
the structure of the file exported by metaxl extract. Also, users
should not use one of the old worksheet's name for the new sheet.

Remarks

Please notice that this software is provided "as is", without warranty of any kind, whether
express, implied, or statutory, including, but not limited to, any warranty of merchantability
or fitness for a particular purpose or any warranty that the contents of the item will be error-free.
In no respect shall the author incur any liability for any damages, including, but limited to,
direct, indirect, special, or consequential damages arising out of, resulting from, or any way
connected to the use of the item, whether or not based upon warranty, contract, tort, or otherwise.

Dependencies

gtools package by Mauricio Bravo

Author

BPLIM, Banco de Portugal, Portugal.

Email: bplim@bportugal.pt

We appreciate your feedback. Comments are welcome!