BookmarkSubscribeRSS Feed
AnnaB
Calcite | Level 5

I have a data set comparing animals that are treated with x versus y. The animals are in cages of varying number per cage (4-9 ). I count the number of sick animals at various time points in the cages.

My data lines include:

treatment   day    sick_animals     animals_per_cage

I denote those R, and the rabbits per cage are N.

When I run the model

proc logistic data = ....;

class treatment (ref=control) day (ref=0):

sick_animals/animals_per_cage= treatment day/cl;

oddsratio treatment/diff=ref;

oddsratio day/diff=ref;

run;

I get different estimates for the parameters estimates (when I exponentiate these) in the 'Analysis of maximum likelihood estimates' compared to what the oddsratios that the model generates.

What is the true odds ratios, and where do I find level of significance (p-value) of the odds ratios. I can see the confidence intervals, but I need the p-value also.

Kind regards,

Anna Catharina

1 REPLY 1
Reeza
Super User

Your code looks like it may have been truncated as there's no model statement, and it looks like you have a colon instead of semi colon in the class statement.

try adding param=ref to the class statement. This tells SAS to use Referential coding rather than the default of Effect coding for the categorical variables.

SAS FAQ: In PROC LOGISTIC why aren't the coefficients consistent with the odds ratios?

proc logistic data = ....;

class treatment (ref=control) day (ref=0)/Param=REF;

sick_animals/animals_per_cage= treatment day/cl;

oddsratio treatment/diff=ref;

oddsratio day/diff=ref;

run;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1370 views
  • 1 like
  • 2 in conversation