**YVY**
capture program drop yvy
program define yvy
version 9.0
syntax namelist(min=3 max=3) [if] [fweight pweight iweight] [, cluster(varname)]
unab vlist : _all
marksample touse
local v `namelist'
local y: word 1 of `v'
local x: word 2 of `v'
local t: word 3 of `v'
local sets: list v - y

foreach con of local sets {
	cnfgen `con'
	qui su `con'
	if `r(sum)' == 0 {
		local toex `con'
	}
}

local numex: word count `toex'
	if `numex' > 0 {
		di as err "Error: `toex' Has No Information - Can't Perform Test"
		capture keep `vlist'
		exit
	}
di
di in white "{ul:Y-CONSISTENCY vs Y-CONSISTENCY}"
di as text  %-11s "`x'Ycons", %-11s "`t'YCons", %7s "F", %9s "P"
qui capture gen num`x' = min(`y',`x') if `touse'
qui capture gen num`t' = min(`y', `t') if `touse'
qui ratio (X: num`x' /`x') (T: num`t' / `t') if `touse' [`weight'`exp'], cluster(`cluster')
qui test _b[X] = _b[T]
di as res %4.3f _b[X], %12.3f _b[T], %14.2f r(F), %9.3f r(p)

capture keep `vlist'
end