fauvernierma / survPen

hazard and excess hazard modelling with multidimensional penalized splines
GNU General Public License v3.0
11 stars 2 forks source link

Test if Hazardratios differ significantly #22

Closed modedec closed 5 years ago

modedec commented 5 years ago

We calculated several predicted Hazard Ratios (risk1/ref, risk2/ref), how can I test at which timepoint there is no significant difference between the two?

H0: There is a Differenze in Hazard ratios between risk1/ref and risk/ref Goal: Reject H0

We have the 95 CI for both Hazard Ratios (see Issue Hazard Ratios). Do I go for a t-Test, if so, how can I figure out the degrees of freedom in order to apply the T-Test?

Any help is highly appreciated.

 lpmatrix.risk2 <- predict(model,df.risk2,type="lpmatrix")
 lpmatrix.risk1 <- predict(model,df.risk1,type="lpmatrix")
 lpmatrix.ref <- predict(model,df.ref,type="lpmatrix")
fauvernierma commented 5 years ago

Hello @modedec and thanks for your question

The notion of statistical testing when one deals with a penalized model is a very complicated one (you can look at Wood 2017 : Generalized additive models an introduction with R for an overview)

In your case I would simply plot both hazard ratios with CIs and look for where the CIs do not overlap (this would give you the segment on which there is a significant difference)

Or why not plotting the Hazard ratio between risk1 and risk2 with its CIs and look for where the CIs do not contain 1 ?

Hope this helps

Best regards,

Mathieu

modedec commented 5 years ago

Thank you very much for your answer, the reference, and the provided solution. We like your package a lot, it gives us new insight into our data. We are looking forward using it in a publication.

Best regards, Ivo