Programming the statistical procedures from SAS

odds ratio estimates in R/N logistic models

Reply
New Contributor
Posts: 2

odds ratio estimates in R/N logistic models

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

Super User
Posts: 18,580

Re: odds ratio estimates in R/N logistic models

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;

Ask a Question
Discussion stats
  • 1 reply
  • 228 views
  • 1 like
  • 2 in conversation