Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: re. epitab and a nice table (A, B \ C, D)
From
jose maria pacheco de souza <[email protected]>
To
[email protected]
Subject
Re: st: re. epitab and a nice table (A, B \ C, D)
Date
Fri, 22 Nov 2013 16:56:50 -0200
Em 22/11/2013 15:43, PAPANIKOLAOU P. escreveu:
I have got a nice table in terms of exposed and controls for a cohort.
That is, I have the A, B alongside the C and D. This is a table 12 rows
by 4 collums.
Is there any command that I would use it to produce for me the
following:
A vector of the odd ratios,
A vector of the upper 95CI
A vector of the lower 95CI
i would appreciate your feedback.
kind regards
panos
Dear Panos:
would the data be displaied something like this?
time exposure outcome frequency
1 0 0
1 0 1
1 1 0
1 1 1
2 0 0
2 0 1
2 1 0
2 1 1
3 0 0
3 0 1
3 1 0
3 1 1
If so, try:
list, clean
logistic outcome exposure [freq= frequency] if time==1
gen or=exp(_b[ exposure]) if time==1
gen orupper=exp((_b[ exposure])+1.96*(_se[ exposure])) if time==1
gen orlower=exp((_b[ exposure])-1.96*(_se[ exposure])) if time==1
foreach time of numlist 2 3{
logistic outcome exposure [freq= frequency] if time==`time'
replace or=exp(_b[ exposure]) if time==`time'
replace orupper=exp((_b[ exposure])+1.96*(_se[ exposure])) if///
time==`time'
replace orlower=exp((_b[ exposure])-1.96*(_se[ exposure])) if///
time==`time'
}
line or time, sort lwidth(thick)||line orupper time, sort
lwidth(thin)||line orlower time, sort lwidth(thin)
Good luck.
josé maria
--
Jose Maria Pacheco de Souza
Professor Titular (aposentado), Professor Senior
Departamento de Epidemiologia/Faculdade de Saude Publica, USP
Av. Dr. Arnaldo, 715
01246-904 - S. Paulo/SP - Brasil
fone (11)3768-8612
www.fsp.usp.br/~jmpsouza
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/