*! version 0.1 29Apr2022

help for metaxl check

Title

metaxl check - checks for inconsistencies in metadata

Syntax

metaxl check
, metafile(fn) [options]

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

checkfile(fn [, replace]) saves the inconsistencies found by the command in the Excel file fn.xlsx.

delimit(delimiter) sets a delimiter for labels in value labels.
Only the text after the delimiter is considered to find warnings or
inconsistencies. This option is useful to find duplicated descriptions in
value labels when the first word of the label is the value (see numlabel).

* required

Description

metaxl check is a Stata command that verifies the integrity of metadata stored
in an Excel file. The command assumes that the Excel file has the structure of the
file produced by metaxl extract. The program searches for
possible problems in the metadata, dividing them into warnings and inconsistencies,
the latter being the most problematic.

The categorization of problems into warnings and inconsistencies is related to the
use of metaxl apply, which performs an integrity check of
the metadata before applying it. So an inconsistency is every problem found in the
Excel file that stops metaxl apply from running. On the other
hand, warnings flag problems in the metadata, but do not halt the execution of
metaxl apply.

Inconsistencies include duplicated variables in the meta file, missing sheets, and
duplicated labels or duplicated values in value labels. Warnings cover problems such
as duplicated data features, missing variable labels, truncated variable labels,
missing value labels if there is more than one language defined, as well as problems
with value labels other than duplicated labels or values. Most of the value label
problems were based on labelbook, used with option problems.

Stored results

metaxl check stores the following in r():

Locals

r(inconsistencies) inconsistencies found

r(warnings) warnings found

Examples

Check metadata from file meta_auto.xlsx.

. metaxl check, meta(meta_auto)

Check metadata from file meta_auto.xlsx. Save the report in checkfile.xlsx. Consider
the text only after the space (" ") to find problems in value labels.

. metaxl check, meta(meta_auto) check(checkfile) del(" ")

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!