Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: check 2 of 3 variables agree a majority decision captured in4th variable


From   "Eamonn O'Brien" <Eamonn.O'Brien@icr.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: check 2 of 3 variables agree a majority decision captured in4th variable
Date   Thu, 05 Oct 2006 10:07:45 +0100

I wonder if someone can get me started on how to approach a problem I
wish to solve. I have searched the archives and not seen anything that's
too similar.

I have variables var1, var2, var3 & var4. Variables var1 var2 & var3
are three independent results of a screening test. The independent
result (ordered categorical) is either normal, borderline, mild, mod or
severe. Variable Var4 is the final result and it is meant to be based on
the majority decision. So if var1 & var3 are borderline for example,
var4 should be borderline, regardless of var2. Another example, if var2
& var3 are severe, var4 should be severe regardless of var1. Where all
three differ I would like to check that var4 is the worst of var1, var2,
var3. If I can get started I think I can develop it to check for missing
values, but I am not sure if I should approach this problem with if
statements or -assert- or something else?

  

*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index