Full distribution for 'b' coefficient when using coxphfit

I'm using coxphfit function. But you only get the HR as exp(b) and the corresponding SE. I want to know if there is a way to get the full distribution from which b and SE were calculated?
Thanks.

 Risposta accettata

I have a few thoughts.
When you say "usually you get ...", do you mean from some other software package, specifically?
Are you calling coxphfit with all the outputs?
[b,logl,H,stats] = coxphfit()
Is that helpful?
Have you seen this documentation page that lists a lot of details about what MATLAB is doing (in addition to the documentation for coxphfit itself).

5 Commenti

Thank you. I'm sorry for not being clear enough. By saying "usually you get ..." I meant that this is what you get when you use the MATLAB command:
[b,logl,H,stats] = coxphfit()
I have read the ducumentation page you reffered me to, but what I'm looking for isn't there...
Just to make sure I'm clear, I'm looking for an array that contains the distribution from which b and SE (stats.se) where calculated.
Thanks again.
the cyclist
the cyclist il 17 Ago 2020
Modificato: the cyclist il 17 Ago 2020
I could not figure out the answer to your question. I looked at both the code for coxphfit (which made me think maybe it assumes that b comes from a gaussian), and I also looked outside of MATLAB for what algorithms typically do for coefficient estimates found by maximizing the partial likelihood function of the model (which is what the MATLAB documentation states that it is doing).
The part of the code that suggests to me that it is assuming a gaussian is that it calculates a z-score from the coefficient by dividing by the SE, and the P values by using the normcdf function (line 496 of the R2020b version of coxphfit).
But, I'm not a statistician, and I'm just poking around here.
Regardless, it is unclear to me what you mean about an "array that contains the distribution".
Thank you for looking into it!
It makes sense that they assume a gaussian distribution.
By "array that contains the distribution", I mean an array of values (which are distrubuted in some way) from which you can calulate b (the mean of the array) and SE (via the variance).
But apparently, this is not the way b and SE are calculated, rather a gaussian distribution is assumed.
Thanks again.
To be clear ... I don't actually think that a gaussian is used in any explicit way in the algorithm.
The coefficent(s) b are found by an iterative process that maximizes the partial likelihood function. I can see that the code uses an optimization method involving trust regions, and I am just speculating that that method might implicitly make assumptions about the quadratic nature of the curvature, and maybe that is equivalent to a gaussian assumption for b. I think one would need to actually understand that optimization method -- as opposed to the model itself -- to really know what is going on under the hood.
Thank you! That really helps.

Accedi per commentare.

Più risposte (0)

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by