Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: RE: Data management/analysis


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: RE: Data management/analysis
Date   Tue, 9 Jul 2002 11:53:02 +0100

Banya, Winston

> Nick suggested that I give an example of the data.
>
> The data is in the following form.
>
> ID   Age  MSP  Dr.  Rel.
>
> 001  60    0   Y     N
> 002  79    5   N     N
> 003  81    3   Y     Y
> 004  91    2   Y     Y
>
> .
> '
> .
> .
> .
> .
>
> 039 75    1    Y     N
>
> The data is about asking a doctor and a relative about whether either of
> them prefers resusitation for elderly dementia patients. What my colleague
> who generated the data wants is whether he can compare when the
> doctor said
> yes and when the relative said yes for the variable msp for
> example. What I
> told him is that it may be difficult to do so without losing some
> data. One
> may get 'independent' samples in the case they do not agree but when the
> agree how is it counted?
>

This makes your data structure clear.

Suppose you have variable names

ID Age MSP doctor relative

-doctor- and -relative- may be string variables
with values "Y" and "N" or numeric variables
with value labels "Y" and "N".

Observations can be identified as agreeing on
the two variables by something like

... if doctor == "Y" & relative == "Y"

or

... if doctor == 1 & relative == 1

The 2 X 2 table of -doctor- and -relative-
seems to be of central interest here.
-kappa- may be useful in looking at the
structure of agreement and disagreement.

Nick
n.j.cox@durham.ac.uk

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