Statalist The Stata Listserver


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

Re: st: Query for OR calculation


From   "Sebastian F. B�chte" <[email protected]>
To   [email protected]
Subject   Re: st: Query for OR calculation
Date   Fri, 20 Apr 2007 18:22:49 +0200

Todd,

I am not sure whether I understand you request correctly. But, if you
are looking for some way of documented data entry, the simplest
approach I can think of is to use the -input- command. You should
create a dofile and this dofile should then contain the -input-
command. This could look like the following.

clear
input patid home_visit clinical_care
1  0 1
2  1 1
3  0 0
...
...
59 1 1
end

tab home_visit clinical_care

But, if you just want to create a quick and dirty database that
reflects your data situation. You could do the following:

clear
set obs 59
gen home_visit = _n <= 41
bys home_visit: gen clinical_care = home_visit == 1 & _n<=33 | ///
                                   home_visit == 0 & _n<=8

tab home_visit clinical_care

Sebastian

On 4/20/07, Todd Swarthout <[email protected]> wrote:
Hello. I have what I assume to be a relatively simple question...

For an HIV programme in Benin we had 59 persons lost to follow-up.
We were able to do home visits for 41 persons, after which 33 returned to clinical care.
Of those 18 we were not able to visit, only 8 returned to clinical care.

What is the most efficient way to create a mini database to define the odds ratio...the odds of returning for clinical care after a home visit as compared to those not visited. I could simply go into the Data Editor of a blank database and enter the numbers...but Id like to type in the data.


Visited 41      (33 reintegrated)
Not Visited     18      (8 reintegrated)
Total   59

Thank you for this service

Todd


Services Technique d'Appui aux Op�rations (STAO)
M�decins du Monde - France
62 rue Marcadet
75018 Paris - France
T�l: +33 (0)1 44 92 16 18


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

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index