| Date: | Tue, 19 May 2009 17:13:58 -0500 |
| Reply-To: | Robin R High <rhigh@UNMC.EDU> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Robin R High <rhigh@UNMC.EDU> |
| Subject: | Re: glimmix question |
|
| In-Reply-To: | <c483c223-1350-430a-a785-d7665d56c04a@v4g2000vba.googlegroups.com> |
| Content-Type: | text/plain; charset="US-ASCII" |
|---|
elodie <elodie.gillain@GMAIL.COM>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
05/19/2009 10:44 AM
Please respond to
elodie <elodie.gillain@GMAIL.COM>
To
SAS-L@LISTSERV.UGA.EDU
cc
Subject
Re: glimmix question
On May 19, 9:37 am, rh...@UNMC.EDU (Robin R High) wrote:
> For the record, I hastily typed in the incorrect formula for the
> cumulative probabilities yesterday for the cumulative logit model, so
the
> "modified" version based on the printed intercepts below (if I copied
them
> correctly) should be:
>
> Cumulative Probs Individual probs add
to
> 1
> row 1: EXP(-3.6743)/(1+EXP(-3.6743)) = 0.02474 prob A = .02474 =
0.02474
> row 2: EXP(-2.3303)/(1+EXP(-2.3303)) = 0.08864 prob B = .08864 -
.02474
> = 0.06390
> row 3 1 prob C = 1 -
.08864
> = 0.91136
>
> The ILINK option gives the cumulative probs for all but the last level
--
> the individual ones can be computed as shown above.
>
> Robin High
> UNMC
>
> elodie <elodie.gill...@GMAIL.COM>
> Sent by: "SAS(r) Discussion" <SA...@LISTSERV.UGA.EDU>
> 05/18/2009 09:00 AM
> Please respond to
> elodie <elodie.gill...@GMAIL.COM>
>
> To
> SA...@LISTSERV.UGA.EDU
> cc
>
> Subject
> glimmix question
>
> Hi all,
>
> I am running a generalized regression. The dependent variable has 3
> categories.
>
> The syntax I am using is
>
> proc glimmix data=;
> class timeclass ;
> model dependent var categorized = / solution ;
> random intercept / subject=id;
> run;
>
> The output reads:
> The GLIMMIX procedure is modeling the probabilities of levels of
> the dep variable having lower Ordered Values.
>
> Effect dep var categorized Estimate
>
> Intercept 1 -3.6743
> Intercept 2 -2.3303
>
> I am confused about what those two intercepts mean. I think that if I
> take the exponential of intercept 1, I get an odds ratio. But I do not
> know whether it measures the odds ratio of going from category 2 to
> category 1, or from category 3 to category 1, or some other
> transition. The manual of proc glimmix leaves much to be desired. Any
> ideas?
>
> Thanks a lot for the help.
Thank you so much for your messages. I very much appreciate your help.
You are right, glimmix is a difficult procedure to use, and I need
more practice with genmod, logistic and the more basic procs. The
ILINK option is useful for getting the estimated probabillities,
thanks.
I have another question. When I include a (0-1) binary covariate to
the model of my original post, I get a (small but significant)
negative coefficient. I will denote the coefficient beta. For some
reason, I do not get an odds ratio when I ask for it. This is
confusing.
So I do not know how to interpret that negative coefficient. Should I
interpret beta using the following equation
exp(\beta) = \frac{P(Y=B|X=1)/P(Y=A|X=1)}{P(Y=B|X=0)/P(Y=A|X=0)}?
or maybe
exp(\beta) = \frac{P(Y=C|X=1)/P(Y=A|X=1)}{P(Y=C|X=0)/P(Y=A|X=0)}
Any ideas?
Thanks a lot for your help
You didn't specify how you asked for it, though the following example may
be of some help:
PROC glimmix DATA=phy;
FREQ count;
MODEL resp = x / dist=multinomial link=clogit solution oddsratio ; *
link=glogit;
OUTPUT out=prd predicted(ilink)=pred;
RUN;
The cumulative logit works with data placed in a table like this:
-----------------------------------
|Counts | Resp | |
| |-----------------| |
| | A | B | C |Total|
|----------+-----+-----+-----+-----|
| x | | | | |
|1 | 10| 4| 12| 26|
|0 | 8| 8| 33| 49|
------------------------------------
The SAS code above gives one odds ratio that is the same for groupings of
adjacent columns
{P(Y=A|X=1)/P(Y=B or C|X=1)}
EXP (beta) = -----------------------------
{P(Y=A|X=0)/P(Y=B or C|X=0)}
and
{P(Y=A or B|X=1)/P(Y=C|X=1)}
EXP (beta) = -----------------------------
{P(Y=A or B|X=0)/P(Y=C|X=0)}
predictions in a table form:
---------------------------------------
|Est Probs | prob1 | prob2 | prob3 |
|-------------+-------+-------+-------|
|x | | | |
|1 | 0.3640| 0.1925| 0.4435|
|0 | 0.1774| 0.1436| 0.6790|
---------------------------------------
if you proceed with the calculations, something like:
prb23 = prob2 + prob3
-------------------------------
|odds ratio 1 | prob1 | prb23 | odds = prob1/prb23
|-------------+-------+-------|
|x | | |
|1 | 0.3640| 0.6360| 0.5724 Odds Ratio = 0.5724/0.2157 = 2.65
|0 | 0.1774| 0.8226| 0.2157
-------------------------------
prb12 = prob1 + prob2
-------------------------------
|odds ratio 2 | prb12 | prob3 | odds = prb12/prob3
|-------------+-------+-------|
|x | | |
|1 | 0.5565| 0.4435| 1.2547 Odds Ratio = 1.2547/0.4728 = 2.65
|0 | 0.3210| 0.6790| 0.4728
-------------------------------
It's been a while since I checked all the details, but it works much like
this with clogit. The glogit option produces separate odds ratios.
Robin High
UNMC
|