I'd like to do different tests depending on a variables type (continuous
vs discrete).
While "codebook" displays "units" that would give me a clue (1 for
discrete, 0.1 & 0.01... for continuous) I can't seem to find a command
or function that would give me a variable's type.
Something like: uses(varname) returning 1 or 0.1 or 0.01...
or type(varname) returning "byte"
"int" "double"...
I imagine doing something like:
foreach v of varlist var1 var2 var3... {
if ( type(`v')==0 ) {
do some discrete tests
}
else {
if ( type(`v')==1 {
do some continuous tests
}
}
}
--
Orion C. Whitaker
Johns Hopkins School of Public Health
Johns Hopkins School of Medicine
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/