BookmarkSubscribeRSS Feed
Asmy
Calcite | Level 5

Hie guys,

 

I am curently in an intership working on SAS, it's ending soon and therfore I am re-runing it bit by bit to make sure it works and that I did not make any mistake.

I had an issue with the unit of one of my variables, the variable take very small values so when odds ratio associated is quite big (31) I tryed changing the unit using 'Units' but the results are exactly the same and i dont get why. Especially since I remember that it use to work . Here is my code, I deleted some of the lines such as title or comments to make it more clear...

 

Proc Logistic data=Table_arachide desc; 
	Model REAALL_A = TRARAH3 ;
Run;

/* and */
Proc Logistic data=Table_arachide desc; 
	Units TRARAH3 = 0.1 ;
	Model REAALL_A = TRARAH3 ;
Run;

I tried multipling the varble value by ten it then gives me different results for the asymptotic test but for the exact one it return me a strange confidence intervalle: [ . ,3.373 ]  the "." being the strange part. 

I hope one of you will be able to help me 🙂

Englich is not my first langage so pardon me if I made some mistake, feel free to ask for any clarification ...

 
4 REPLIES 4
PaigeMiller
Diamond | Level 26

As an example, lets look at

 

proc logistic data=sashelp.class;
model sex=height;
units height=0.1;
run;

so, here is the relevant parts of the output

 

           Odds Ratio Estimates

             Point          95% Wald
Effect    Estimate      Confidence Limits

Height       0.863       0.700       1.064

          Odds Ratios

Effect         Unit     Estimate

Height       0.1000        0.985

The odds ratio calculated normally (without the UNITS command) is 0.863. If you set the UNIT to 0.1, you get an odds ratio of 0.985.

 

--
Paige Miller
Asmy
Calcite | Level 5

Thank you for your response PaigeMiller but am not sure to get what you are trying to say. Could you explaine it a little more ?

PaigeMiller
Diamond | Level 26

What part is not clear? The example shows that using the UNITS command does produce in a different odds ratio, as expected.

--
Paige Miller
PGStats
Opal | Level 21

Note that the procedure displays two tables "Odds ratio estimates" and "Odds Ratios". The later includes a column for units and the odds ratio for those units.  In your case, for an odds ratio of 31, the corrected value corresponding to units=0.1 should be Exp(0.1*Log(31)) = 1.41.

 

 

PG

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1323 views
  • 0 likes
  • 3 in conversation