knowledge-database (beta)

Current group: comp.soft-sys.sas

how can I get a specific OR from proc logistic

how can I get a specific OR from proc logistic  
Rong Wang
 Re: how can I get a specific OR from proc logistic  
omugeye
 Re: how can I get a specific OR from proc logistic  
rong wang
 Re: how can I get a specific OR from proc logistic  
David L. Cassell
 Re: how can I get a specific OR from proc logistic  
David L. Cassell
From:Rong Wang
Subject:how can I get a specific OR from proc logistic
Date:21 Jan 05 23:39:09 GMT
I use proc logistic to caculate odds ratio. I use ods select to ask SAS
show me only estimate odds ratio table. But this is till too much for me.
To tell the truth I only want odds ratio estimate (point, CL) of one
particular varible. Since I have to test hundreds time, I need some simple
way to get these value except manually.
From:omugeye
Subject:Re: how can I get a specific OR from proc logistic
Date:21 Jan 2005 16:26:30 -0800
In my opinion, a macro is the way to go, because it will reiterate this
100, 1000 times if you want. This should use the ODS facility. Others
may proffer differrent opinions.

Create a macro that reads the odds ratio and its confidential
intervals, either by extracting these from the ODS dataset, or reads
this data set and "keep"s (to use a SAS word) only the results for the
desired variable.

Then insert these results at the bottom of a big table (dataset) using
proc append or SQL code.

I have done this for proc freq, but while the general idea is the same,
each sistuation is awesomely unique.
Repeat this process for n regressions.
From:rong wang
Subject:Re: how can I get a specific OR from proc logistic
Date:22 Jan 05 00:38:57 GMT
I creat a macro for proc logistic. I just don't know how to extract
one specific not all odds ratio from sas.

On Fri, 21 Jan 2005 16:26:30 -0800, omugeye wrote:
> In my opinion, a macro is the way to go, because it will reiterate this
> 100, 1000 times if you want. This should use the ODS facility. Others
> may proffer differrent opinions.
>
> Create a macro that reads the odds ratio and its confidential
> intervals, either by extracting these from the ODS dataset, or reads
> this data set and "keep"s (to use a SAS word) only the results for the
> desired variable.
>
> Then insert these results at the bottom of a big table (dataset) using
> proc append or SQL code.
>
> I have done this for proc freq, but while the general idea is the same,
> each sistuation is awesomely unique.
> Repeat this process for n regressions.
>
From:David L. Cassell
Subject:Re: how can I get a specific OR from proc logistic
Date:22 Jan 05 00:44:25 GMT
rong wang wrote:
> I creat a macro for proc logistic. I just don't know how to extract
> one specific not all odds ratio from sas.

As I said in my previous post, this is probably the wrong way to
approach
your problem, despite what Omugeye said. Really.

David
--
David Cassell, CSC
Cassell.David@epa.gov
Senior computing specialist
mathematical statistician
From:David L. Cassell
Subject:Re: how can I get a specific OR from proc logistic
Date:22 Jan 05 00:43:09 GMT
Rong Wang wrote:
> I use proc logistic to caculate odds ratio. I use ods select to ask
SAS
> show me only estimate odds ratio table. But this is till too much for
me.
> To tell the truth I only want odds ratio estimate (point, CL) of one
> particular varible. Since I have to test hundreds time, I need some
simple
> way to get these value except manually.

[1] You can either use a WHERE clause to pull out just the record you
want as ODS creates the table, or you can do it in a following data
step.
You do know the name of the effect for which you want the OR, right?

[2] If you are doing this hundreds of times, you may be doing something
bad.
WHY are you running PROC LOGISTIC hundreds of times?

If you're doing some manner of simulation or bootstrapping, you ought to
be concatenating your data sets and using by-variable processing
instead.
It will probably run a *lot* faster.

If you're doing some manner of insert-new-variable-and-retry regression
approach, then you're most likely doing something Very Bad. And
anyway,
PROC LOGISTIC has a stepwise methodology. I don't recommend the thing,
but it's there already.

So why do you need *hundreds* of runs?

David
--
David Cassell, CSC
Cassell.David@epa.gov
Senior computing specialist
mathematical statistician
   

Copyright © 2006 knowledge-database   -   All rights reserved