scheike / timereg

timereg R package, survival analysis methods
29 stars 5 forks source link

Different coefficient numbers with summary or coef #9

Open spenafajuri opened 4 years ago

spenafajuri commented 4 years ago

Dear Thomas, I have been using Aalen models quite a lot lately and I noticed that I get different numbers for both the coefficients and standard errors when using summary() versus obtaining the coefficients directly or in my case extracting the coefficients and robust standard errors.

For example: summary(finalaalen) mu <- finalaalen$gamma[1]

The coefficient in the first output is 0.000952000 and with gamma is 0.00095228119

This level of precision might not be very relevant for hazard ratios, but since this output is usually multiplied by 10,000 or 100,000 it might make a difference in Aalen hazard models.

Also I'd be nice that 95% confidence intervals are calculated based on robust standard errors when robust=TRUE in the model.

These are not really issues, just suggestions, but I spent quite some time wondering why the numbers didn't match.

Best wishes, Sebastián

scheike commented 4 years ago

Dear Sebastian,

must be due to ties in the data, these are broken by adding random noise. Thanks for your suggestions.

best regards

Thomas On Mon, 9 Dec 2019, Sebastián Peña wrote:

Dear Thomas, I have been using Aalen models quite a lot lately and I noticed that I get different numbers for both the coefficients and standard errors when using summary() versus obtaining the coefficients directly or in my case extracting the coefficients and robust standard errors.

For example: summary(finalaalen) mu <- finalaalen$gamma[1]

The coefficient in the first output is 0.000952000 and with gamma is 0.00095228119

This level of precision might not be very relevant for hazard ratios, but since this output is usually multiplied by 10,000 or 100,000 it might make a difference in Aalen hazard models.

Also I'd be nice that 95% confidence intervals are calculated based on robust standard errors when robust=TRUE in the model.

These are not really issues, just suggestions, but I spent quite some time wondering why the numbers didn't match.

Best wishes, Sebastián

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/scheike/timereg/issues/9