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: RE: margins


From   "Fitzmaurice, Ann E." <a.e.fitzmaurice@abdn.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: margins
Date   Wed, 11 May 2011 10:13:24 +0100

Hi

Apologies for not putting version , yes i am using stata version 11 and it is fully updated

I have keep the model simple, there are other main effects I would want to enter, I have run the following

logistic preterm2 i.bir_grp2##i.age_gp2a

what I want to use margins for is to create a table of the odds ratios (preferably including confidence intervals) of bir_gr2 (four levels _ by age_gp2a (4 levels) , and this is where I though I want to use margins, perhaps this is not the correct command

thanks

ann


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
Sent: 11 May 2011 08:32
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: RE: margins

-margins- does not exist before Stata 11, so it may be presumed that
Ann is using Stata 11.

On Wed, May 11, 2011 at 7:40 AM, Jesper Lindhardsen
<JESLIN01@geh.regionh.dk> wrote:

> If you use Stata 11 then you should use ## instead of * if you want the
> full interaction terms, ie. logistic preterm i.bir_grp##i.age_gr2a
>
> Otherwise, it is difficult to say without your actual syntax (and Stata
> version).

Ann

> Am trying to use margins in the following model
>
> Logistic preterm i.bir_grp*i.age_gr2a  other categorical variables
>
> Bir_grp has 4 levels, and age_gp2a has 5 levels
>
> I get an error message "factor bir_grp not found in e(b)"
>
> Question , have I mis-specified the model  and how can I get margins to
> give me the table
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


The University of Aberdeen is a charity registered in Scotland, No SC013683.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index