Reputation: 1
I have been asked to add a global p-value to my categorical variables in my multivariable logistic regression model and in my multivariable cox proportional hazard model.
I have used the function add_global_p()
when using the function tbl_regression
(which summarizes my results into a table) but I cannot figure out which tests have been used to calculate the global p-value. Is it the wald test? Do I need to specify the test or does it automatically select the test according to the model you have used?
Upvotes: 0
Views: 703
Reputation: 106
If you use coxph()
function from survival
package to fit your cox proportional hazard model, you can use summary()
call to get the global p-value. There are three p-values calculated using three different tests (likelihood ratio test, Wald test and score logrank test) offered on the bottom of the output.
library(survival)
model_fit <- coxph(Surv(time, status) ~ covariate_1 + ... + covariate_n, data = your_data)
summary(model_fit)
Upvotes: 1