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

From |
Amy Jennings <amyjennings79@hotmail.com> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: log binomial regression - categorical independent variables |

Date |
Thu, 20 Aug 2009 13:43:11 +0000 |

Hi, Many thanks for your reply it was greatly appreciated- I have tried your suggestion but it does not seem to be working. This if the syntax I have used: xi:glm IOTFnew highested_2 i.highested_2*IOTFnew, family(binomial) link(log) eform IOTFnew is the dependent variable (child weight status - 2 categories) and highested_2 the independent (4 categories) and below is the response I am getting i.highested_2 _Ihighested_1-4 (naturally coded; _Ihighested_1 omitted) i.high~2*IOTF~w _IhigXIOTFn_# (coded as above) note: _Ihighested_4 dropped because of collinearity Iteration 0: log likelihood = -130.92025 (not concave) Iteration 1: log likelihood = -130.92025 (not concave) Iteration 2: log likelihood = -130.92025 (not concave) Iteration 3: log likelihood = -130.92025 (not concave) Iteration 4: log likelihood = -130.92025 (not concave) Iteration 5: log likelihood = -130.92025 (not concave) Iteration 6: log likelihood = -130.92025 (not concave) Iteration 7: log likelihood = -130.92025 (not concave) Iteration 8: log likelihood = -130.92025 (not concave) Iteration 9: log likelihood = -130.92025 (not concave) Not sure where I am going wrong? I have tried a few variations but don't seem to be getting very far, Many thanks again, kind regards, Amy ---------------------------------------- > Date: Thu, 20 Aug 2009 15:00:33 +0200 > From: evans.jadotte@uab.es > Subject: Re: st: log binomial regression - categorical independent variables > To: statalist@hsphsun2.harvard.edu > > Amy Jennings wrote: >> Hi >> >> I am currently using stata to estimate prevalence ratios (or risk ratios as I think stata refers to them) using log binomial regression with the glm function. I am using the syntax >> >> glm dependent independent, family(binomial) link(log) eform >> >> this has worked fine but I would now like to add a categorical independent variable with more than two categories, and obtain coefficients for each of the categories, e.g. I am trying to calculate prevalence ratios for childhood overweight compared with normal weight for increasing category of parental education, is it possible to estimate prevalence ratios for children whose parents are educated to school-level or university-level verses those with no education? >> >> Many thanks in advance, >> _________________________________________________________________ >> Windows Live Messenger: Happy 10-Year Anniversary—get free winks and emoticons. >> http://clk.atdmt.com/UKM/go/157562755/direct/01/ >> * >> * 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/ >> > Hi, > > Maybe what you want is: > > xi:glm dependent independent... i.schooling*overweight, family(binomial) link(log) eform > > Schooling is assumed to have various categories and stata will keep the first one as reference. You can however control which one is used as a reference group. > > Hope this helps, > > Evans > > > > > * > * 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/ _________________________________________________________________ Upgrade to Internet Explorer 8 Optimised for MSN. http://extras.uk.msn.com/internet-explorer-8/?ocid=T010MSN07A0716U * * 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/

**Follow-Ups**:**RE: st: log binomial regression - categorical independent variables***From:*"Kieran McCaul" <Kieran.McCaul@uwa.edu.au>

**References**:**st: log binomial regression - categorical independent variables***From:*Amy Jennings <amyjennings79@hotmail.com>

**Re: st: log binomial regression - categorical independent variables***From:*Evans Jadotte <evans.jadotte@uab.es>

- Prev by Date:
**Re: st: log binomial regression - categorical independent variables** - Next by Date:
**Re: st: RE: how to check that demographic values within the same zipcode are identical?** - Previous by thread:
**Re: st: log binomial regression - categorical independent variables** - Next by thread:
**RE: st: log binomial regression - categorical independent variables** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |