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

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

Re: st: Comparing trend (y) with trend (x) using ordinal logistic regression

 From Ameya Bondre To statalist@hsphsun2.harvard.edu Subject Re: st: Comparing trend (y) with trend (x) using ordinal logistic regression Date Mon, 12 Nov 2012 15:42:35 -0500

```I am sorry but I think I was not clear...

So, the logit model that I am looking for is -

malnutrition (0 = present in 2009 and 1 = present in 2011) --->
constant + exclusive breastfeeding (0 = present in 2009 and 1 =
present in 2011)

to see relationship between change in malnutrition as a function of
time and a function of change in breastfeeding prevalence...

and the data I have is -

mal     bf      time
1       0       0       0
2       1       0       0
3       1       1       0
4       0       1       1
5       0       1       1
6       1       0       1

where 0 and 1 for mal and bf, stand for "no" and "yes" or "absence"
and "presence" of malnutrition and breastfeeding respectively,
depending on time = 0 (2009) or 1 (2011). Both variables could take
either of 2 possible values at one time.

So, I can surely do logits choosing one of these variables as a
function of time like; mal = c + time /bf = c + time..

but, if I perform a logit like this: mal = c + bf + time, it can't
give the relationship between change in mal (y) and change in bf (x),
over time (or from 2009 to 2011)?...

I am sorry, I hope I'm clear now?..

Thank you for your time..

On Mon, Nov 12, 2012 at 2:12 PM, Nick Cox <njcoxstata@gmail.com> wrote:
>
> I'd follow Maarten's pointers on this. Yes; -bf- can be a predictor too.
>
> I am puzzled by your belief, repeated here, that you need new
> variables. You already have the data in optimal form as 0 and 1 values
> for logit analyses: creating different versions of the same variables
> will make nothing easier and -logit- impossible.
>
> Nick
>
> On Mon, Nov 12, 2012 at 6:59 PM, Ameya Bondre
> <ameyabondre.jhsph@gmail.com> wrote:
> > Thanks, I am trying to see if I can adapt the example given by
> > Maarten, to my data...but would it be possible if I want to include
> > mal and bf as a response and predictor respectively, in the same logit
> > model and with this data set?
> >
> > If yes, do I have to create new variables from mal and bf, to see
> > trend in mal as a function of trend in bf?
> >
> >  I mean variables such as mal = 1 (mal in 2009) or 2 (mal in 2011) and
> > bf = 1 (bf in 2009) or 2  (bf in 2011)
> >
> >
> > On Mon, Nov 12, 2012 at 1:35 PM, Nick Cox <njcoxstata@gmail.com> wrote:
> >>
> >> All your variables are binary, so your ordinal logit collapses to a
> >> logit. Other predictors you don't name won't change that so long as
> >> your outcome variable is fraction or proportion malnourished.
> >>
> >> Nick
> >>
> >> On Mon, Nov 12, 2012 at 6:17 PM, Ameya Bondre
> >> <ameyabondre.jhsph@gmail.com> wrote:
> >>
> >> > My data set is in this format: [observations 1 to 6 --> children
> >> > (with
> >> > their mothers as respondents)]
> >> >
> >> >         mal     bf      time
> >> > 1       0       0       0
> >> > 2       1       0       0
> >> > 3       1       1       0
> >> > 4       0       1       1
> >> > 5       0       1       1
> >> > 6       1       0       1
> >> >
> >> > where each of the three variables is ordinal taking two values, 0 and
> >> > 1.
> >> >
> >> > Explanation for variables:
> >> >
> >> > time: data collected in year ___ (0 = year 2009, 1 = year 2011)
> >> > mal: child malnourished (0 = no, 1 = yes)
> >> > bf: child breastfed exclusively for first six months (0 = no, 1 =
> >> > yes)
> >> >
> >> > I want to see the relationship between the change in number of
> >> > malnourished children with the change in number of children
> >> > exclusively breastfed, from 2009 to 2011. I tried to perform an
> >> > ordinal logistic regression but I am getting errors.
> >> >
> >> > Could you please explain the way in which I can construct new
> >> > variables out of these, to enter in the ologit model? My end goal is
> >> > to assess the change in malnutrition as a function of the change in
> >> > other predictors as well, in addition to bf.
> *
> *   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/

--
Dr. Ameya Bondre
Research Analyst, Tufts University, Boston, MA
Master of Science in Public Health (MSPH)
Johns Hopkins Bloomberg School of Public Health, Baltimore, MD
MBBS, G.S Medical College and KEM Hospital, Mumbai, India
Phone: (781) 298-1668
Email: ameyabondre.jhsph@gmail.com
*
*   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–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index