0
$\begingroup$

I'm trying to calculate the hazard ratio between two classes, from a variable composed by three classes, i'm modelling an AFT weibull model with this and other indipendent variables

for example my variable is a categorial variable:

0 = group A

1 = group B

2 = group C

my model is:

log h(t) = alfa*log (t) + beta0_ + Beta1_ * X

where:

beta0_ is for the intercept

beta1_ is my variable of interest

the parameter are calculated from the estimate parameter of the sas proc lifereg in this method:

beta0_ = -beta0/scale_parameter

beta1_ = -beta1/scale_parameter

When i try to make an estimation of the hazard ratio between the C and A groups

HR = exp (beta1_ * 2) / exp(beta1_ * 0) = exp (beta1_ * 2)

my problem is if i apply the same method on the same data by changing only the classification indication in a second variable:

0 = group A

2 = group B

1 = group C

(the groups are fixed for individual i change only the indication variable value)

i replace the previous classification variable with this one and i repeat the same step, the lifereg estimation obviusly change but when i went to calculate the hazard ratio for the same classes, which i expect to be the same then before, calculated as:

HR = exp (beta1_ * 1) / exp(beta1_ * 0) = exp (beta1_ * 1)

it result different from the previously calculated why?

$\endgroup$

1 Answer 1

0
$\begingroup$

you should be using two indicator variables rather than a single variable with 3 numeric values. Unless you use the class statement (ie "class group" or whatever the variable is called, before the model statement), then proc lifereg will create the indicator variables for you in the background. https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_lifereg_sect009.htm

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.