-------------------------------------------------------------------------------
help for vlc
-------------------------------------------------------------------------------

Compare value labels across datasets

vlc [varlist1] [using filename1] [weight] [if exp] [in range] [, to(filenamelist) tab pcent nofreq nomiss nozero saving(filename2) [replace | append] clear ]

aweights, fweights, iweights and pweights are allowed; see help weights.

Description

vlc compares value labels across two datasets, and optionally compares the distribution of observations (with the tab option). If no filename is specified with using, the data currently in memory are assumed to be the using data.

Options

to(filenamelist) specifies a set of files to which the current file (either in memory or specified with using) should be compared. If no comparison file is specified, the value labels in the current file are tabulated with no comparison group. If multiple files are specified, the list of file names may need to be enclosed in compound double quotes; see help quotes.

tab tabulates the frequency of value label assignments in both datasets.

pcent specifies that tabulations of value label assignments should report percentages in addition to frequencies.

nofreq suppresses frequencies in tabulations of value label assignments.

nomiss requests that no missing values be tabulated.

nozero suppresses categories with no observations in either dataset.

clear replaces the data currently in memory. Without this option, data that has changed since the last save will not be lost; instead, an error will result.

saving(filename2) specifies a file location to which to write a tab-delimited text file of results.

replace specifies that the file specified in saving(filename2) may be overwritten if it exists already.

append specifies that the tabulation should be appended to the file specified in saving(filename2), assuming it exists already.

Remarks

When vlc terminates, a dataset is in memory containing labels, values, and frequencies or percentages if requested. vlc saves no results in r(). Type preserve before running vlc to facilitate returning to data in memory.

Examples

------------------------------------------------------------------------- ssc install ddf2dct, replace clear tempfile do dct s96 ddf2dct using http://www.nber.org/sipp/1996/sipp96l.ddf, dct(`dct') do(`do') run `do' describe t??amt notes t50 save `s96' tempfile do dct s01 ddf2dct using http://www.nber.org/sipp/2001/sipp01w1.ddf, dct(`dct') do(`do') clear run `do' notes t50 tempfile do dct s93 ddf2dct using http://www.nber.org/sipp/1993/sipp93w1.ddf, dct(`dct') do(`do') clear run `do' notes higrade save `s93' vlc higrade, to(`s96') use `s96', clear vlc eeducate, to(`s93') ------------------------------------------------------------------------- clear tempfile do dct c89 ddf2dct using http://www.nber.org/cps/cpsmar89_91.doc, dct(`dct') do(`do') drop(FILLER) run `do' save `c89' clear tempfile do dct c92 ddf2dct using http://www.nber.org/cps/cpsmar92.ddf, dct(`dct') do(`do') drop(FILLER) run `do' save `c92' vlc a_hga, to(`c89') g lab92=trim(substr(label1,1,25) ren label2 lab91 li val lab91 lab92, noo clean -------------------------------------------------------------------------

Author

Austin Nichols Urban Institute Washington, DC austinnichols@gmail.com

Also see

Manual: [U] 15.6 Dataset, variable, and value labels, [R] label