Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

P, trend analysis

428 views
Skip to first unread message

sophiec...@hotmail.com

unread,
Jun 2, 2009, 10:11:13 AM6/2/09
to
Hi everybody,

After I used a Cox Regression model to analyse a relation between DNA
genotypes (like; BB, Bb, bb) and the development of a certain disease,
I want to see if there is a trend.
My dependant variable is binominal (yes disease/no disease) and my
independant variables are coded like 0, 1, 2.

Does anybody know which regression analysis I have to perform to get
my P for trend?

I hope anybody can help,

S. Flohil

Bruce Weaver

unread,
Jun 2, 2009, 1:31:45 PM6/2/09
to


One of the contrast types available in COXREG is POLYNOMIAL. This
will give you the linear and quadratic trends. Is that what you had
in mind?

To see all of the available contrast types, search the help files for
<COXREG (command), CONTRAST subcommand>.

--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

sophiec...@hotmail.com

unread,
Jun 3, 2009, 4:40:13 AM6/3/09
to
On 2 jun, 19:31, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
> On Jun 2, 10:11 am, sophiechrist...@hotmail.com wrote:
>
> > Hi everybody,
>
> > After I used a Cox Regression model to analyse a relation between DNA
> > genotypes (like; BB, Bb, bb) and the development of a certain disease,
> > I want to see if there is a trend.
> > My dependant variable is binominal (yes disease/no disease) and my
> > independant variables are coded like 0, 1, 2.
>
> > Does anybody know which regression analysis I have to perform to get
> > my P for trend?
>
> > I hope anybody can help,
>
> > S. Flohil
>
> One of the contrast types available in COXREG is POLYNOMIAL.  This
> will give you the linear and quadratic trends.  Is that what you had
> in mind?
>
> To see all of the available contrast types, search the help files for
> <COXREG (command), CONTRAST subcommand>.
>
> --
> Bruce Weaver
> bwea...@lakeheadu.cahttp://sites.google.com/a/lakeheadu.ca/bweaver/

> "When all else fails, RTFM."

Well, I thought I could calculate the p, trend by using chi-square.
Then I will found my p, trend in the table at the linear-by-linear
association. Is that correct?

Bruce Weaver

unread,
Jun 3, 2009, 7:08:55 AM6/3/09
to
On Jun 3, 4:40 am, sophiechrist...@hotmail.com wrote:
> On 2 jun, 19:31, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
>
>
>
> > On Jun 2, 10:11 am, sophiechrist...@hotmail.com wrote:
>
> > > Hi everybody,
>
> > > After I used a Cox Regression model to analyse a relation between DNA
> > > genotypes (like; BB, Bb, bb) and the development of a certain disease,
> > > I want to see if there is a trend.
> > > My dependant variable is binominal (yes disease/no disease) and my
> > > independant variables are coded like 0, 1, 2.
>
> > > Does anybody know which regression analysis I have to perform to get
> > > my P for trend?
>
> > > I hope anybody can help,
>
> > > S. Flohil
>
> > One of the contrast types available in COXREG is POLYNOMIAL.  This
> > will give you the linear and quadratic trends.  Is that what you had
> > in mind?
>
> > To see all of the available contrast types, search the help files for
> > <COXREG (command), CONTRAST subcommand>.
>
> Well, I thought I could calculate the p, trend by using chi-square.
> Then I will found my p, trend in the table at the linear-by-linear
> association. Is that correct?


If you did that, you'd be analyzing whether the event occurred or not,
but would be omitting time-to-event; and I think you'd be looking at
the linear trend only. If you use the polynomial contrast in COXREG,
you keep the time-to-event information, and can examine both the
linear and quadratic trends.

--
Bruce Weaver
bwe...@lakeheadu.ca

sophiec...@hotmail.com

unread,
Jun 3, 2009, 7:21:28 AM6/3/09
to
> bwea...@lakeheadu.cahttp://sites.google.com/a/lakeheadu.ca/bweaver/
> "When all else fails, RTFM."- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Thank you for your respons. I understand what you're saying. So, I did
the Cox regression analysis again, but this time I used the polynomial
contrast...
The hazard ratio's (ExpB) I found now, don't differ from those I found
when I calculated with the Cox regression analysis without the
polynomial contrast.
So..if I calculate my P trend like you suggested it.. my p-value for
trend is the exact same as my p-value I calculated with the Coxreg
without polynomial contrast.;
is that correct?

Thank you in advance

sophiec...@hotmail.com

unread,
Jun 3, 2009, 7:43:37 AM6/3/09
to
> Thank you in advance- Tekst uit oorspronkelijk bericht niet weergeven -

>
> - Tekst uit oorspronkelijk bericht weergeven -

Mmh, I think I see what I did wrong. I didn't change from indicator to
polynomial contrast correct. But I do see one problem with the Coxreg.
I changed my reference point from last to first when I first started
calculating hazard ratio's. But now, when I change indicator to
polynomial contrast, I can't change my reference point anymore. So I
can't compare the results properly. Does anyone have a solution for
that?

Thank you

rkai...@gmail.com

unread,
Jul 29, 2014, 2:26:26 PM7/29/14
to
Hello,

I was reading this thread to help me with a project I'm working on right now.
Could you tell me where in the output I'm supposed to look for the p-trend?
when I set the contrast to polynomial in cox regression,
I get an ouput with that's exactly the same as when I do the normal 'indicator' contrast
('variables in the equation' table with beta, wald, exp(b), CIs, etc)
but with different numbers.
In that table, which is the p-trend value? and is this the p value for linear or
quadratic trend?

your help'd be much appreciated.
Thanks

Bruce Weaver

unread,
Jul 29, 2014, 3:54:20 PM7/29/14
to
On 29/07/2014 2:26 PM, rkai...@gmail.com wrote:
--- snip ---
>
> Hello,
>
> I was reading this thread to help me with a project I'm working on right now.
> Could you tell me where in the output I'm supposed to look for the p-trend?
> when I set the contrast to polynomial in cox regression,
> I get an ouput with that's exactly the same as when I do the normal 'indicator' contrast
> ('variables in the equation' table with beta, wald, exp(b), CIs, etc)
> but with different numbers.
> In that table, which is the p-trend value? and is this the p value for linear or
> quadratic trend?
>
> your help'd be much appreciated.
> Thanks
>

RTFM. It says:

Polynomial contrasts. The first degree of freedom contains the linear
effect across the categories of the independent variable, the second
contains the quadratic effect, and so on. By default, the categories are
assumed to be equally spaced; unequal spacing can be specified by
entering a metric consisting of one integer for each category of the
independent variable in parentheses after the keyword POLYNOMIAL. For
example, CONTRAST(STIMULUS) = POLYNOMIAL(1,2,4) indicates that the three
levels of STIMULUS are actually in the proportion 1:2:4. The default
metric is always (1,2,...,k), where k categories are involved. Only the
relative differences between the terms of the metric matter: (1,2,4) is
the same metric as (2,3,5) or (20,30,50) because, in each instance, the
difference between the second and third numbers is twice the difference
between the first and second.

--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home
0 new messages