kelsz24
kelsz24

Reputation: 23

Correct estimate statement for PROC GENMOD

I have been trying to run modified poisson regression on my data. The exposure variable has 3 levels. The reference level is 1. I have never used the estimate statement and was never taught how. Is my code below the correct syntax?

    class exposure_var(ref='1')/ param = ref;
    model outcome_var = exposure_var covar1 covar2 cover3 / dist=poisson link=log;
    weight weight_var;
    estimate 'outcome_var level 2 vs ref' exposure_var 2 1 / exp; 
    estimate 'outcome_var level 3 vs ref' exposure_var 3 1 / exp; 
run;

or would it be something like this?

    class exposure_var(ref='1')/ param = ref;
    model outcome_var = exposure_var covar1 covar2 cover3 / dist=poisson link=log;
    weight weight_var;
    estimate 'outcome_var level 2 vs ref' exposure_var 2 -1 / exp; 
    estimate 'outcome_var level 3 vs ref' exposure_var 3 -1 / exp; 
run;

or even something like this?

    class exposure_var(ref='1')/ param = ref;
    model outcome_var = exposure_var covar1 covar2 cover3 / dist=poisson link=log;
    weight weight_var;
    estimate 'outcome_var level 2 vs ref' exposure_var 2 -1 / exp; 
    estimate 'outcome_var level 3 vs ref' exposure_var 3 -2 / exp; 
run;

Thank you in advance!

Upvotes: 0

Views: 472

Answers (1)

data _null_
data _null_

Reputation: 9109

See what happens when you specify the coefficients as follows.

estimate 'outcome_var level 2 vs ref' exposure_var -1 1 0 / exp; 

I notice you have REF='1' which will make that the last coefficient

estimate 'outcome_var level 2 vs ref' exposure_var  1 0 -1 / exp; 

May want to also use LSMEANS with diferent option.

Upvotes: 1

Related Questions