Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Adjusted Prevalence from Logistic models


From   Richard Williams <richardwilliams.ndu@gmail.com>
To   statalist@hsphsun2.harvard.edu, <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Adjusted Prevalence from Logistic models
Date   Wed, 24 Oct 2012 03:18:11 -0500

At 01:18 AM 10/24/2012, Dean Eurich wrote:
Hi all,

A simple question. If I run a logistic model:

logistic BB age sex rural

I get the OR for the effect of rural (which is a flag for rural=0 or urban=1 dwelling) on the use of beta blockers (medication used to treat cardiovascular disease).

A reviewer has asked for us to present the adjusted prevalence for the use of BB by rural and urban status. I am not to sure how to do this.

I assume I could use the 'margin' command.

So would it be as simple as

 margins rural, atmeans

(Although I realize I could do it as specific levels of sex and age as well)

Thanks

Dean

I'm not totally sure how you want to adjust. But if you want to use -margins- you should use factor variable notation, e.g.

logistic BB age i.sex i.rural
margins rural, atmeans

In general, I am not crazy about the atmeans option, and I especially don't like it when you have a variable like sex in the model. You'll be plugging in something like .5 for sex (the average person is half male, half female?) I'd rather use the default -asobserved- or plug in specific values or ranges of values for the other variables. For some highlights of what you can do with margins, see

http://www.nd.edu/~rwilliam/stats/Margins01.pdf

As a sidelight, when you say rural=0 or urban=1, that sort of sounds to me like heads I win, tails you lose. Aren't rural=0 and urban=1 the same thing?

-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  Richard.A.Williams.5@ND.Edu
WWW:    http://www.nd.edu/~rwilliam

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


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