timereg icon indicating copy to clipboard operation
timereg copied to clipboard

Different coefficient numbers with summary or coef

Open spenafajuri opened this issue 6 years ago • 1 comments

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

spenafajuri avatar Dec 09 '19 09:12 spenafajuri

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

scheike avatar Dec 09 '19 09:12 scheike