Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation of summary.coxph.penal()$coefficient and consistency with summary.coxph()$coefficient #293

Open
ThomasSoeiro opened this issue Jan 16, 2025 · 0 comments

Comments

@ThomasSoeiro
Copy link

?summary.coxph says:

coefficients
a matrix with one row for each coefficient, and columns containing the coefficient, the hazard ratio exp(coef), standard error, Wald statistic, and P value.

And as documented:

> fit <- coxph(Surv(time, status) ~ age + sex, lung) 
> summary(fit)
           coef exp(coef)    se(coef)         z    Pr(>|z|)
age  0.01704533  1.017191 0.009223273  1.848078 0.064591012
sex -0.51321852  0.598566 0.167457962 -3.064760 0.002178445

But there is no ?summary.coxph.penal (it "redirects" to ?coxph) and the coefficients matrix is different:

> fit <- coxph(Surv(time, status) ~ pspline(age) + sex, lung) 
> summary(fit)
                            coef    se(coef)         se2    Chisq       DF
pspline(age), linear  0.01689968 0.009032792 0.009032362 3.500361 1.000000
pspline(age), nonlin          NA          NA          NA 2.940696 3.092186
sex                  -0.51821169 0.168425387 0.168126761 9.466715 1.000000
                               p
pspline(age), linear 0.061355442
pspline(age), nonlin 0.416841834
sex                  0.002092337

It would be useful to document summary.coxph.penal()$coefficient (and other possible differences with summary.coxph()) and add exp(coef) in the matrix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant