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;

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 1674 views
  • 1 like
  • 2 in conversation