Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: Estimating adjusted prevalence from logistic model

From   Lin Yang <>
To   statalist <>
Subject   st: Estimating adjusted prevalence from logistic model
Date   Mon, 17 Feb 2014 19:49:55 -0600

Hi All

A question regarding how to retrieve the adjusted prevalence from
logistic models. As in odds is the prevalence divide 1 minus the
I suppose I could use "margins", and set my covariates at certain
values, but I am not sure I am doing it right.

For example, I run my model

xi: logit outcome i.cov1 i.cov2 age
where cov1 and cov2 are categorical variables. cov1 is equal to 1 or
2. cov2 is equal to 1, 2, or 3. And age is a continuous variable.

then I try to retrieve the prevalence of the outcome in the subgroup
where cov1 is 1 and cov2 is 1, and adjusting for age
Should I do
margins, at (_Icov1_2=0 _Icov2_2=0 _Icov2_3=0)
margins, at (_Icov1_2=0 _Icov2_2=0 _Icov2_3=0) atmeans

I am not sure whether I should include 'atmeans' here if I would like
to have an age-adjusted prevalence estimate.
Or should I use the command 'margins' for the estimation on prevalence
of the outcome in a sub-group at all?
Would very much appreciate your help!


Lin Yang
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index