I'm stumped here and hoping that someone can help me out.
I'm running a crude Cox PH model for a dichotomous predictor ("base_factor") and time of death. The modelruns without errors and the results can be displayed with summary(), as well as knitted to html in rmd.
factor_cox <- coxph(Surv(time, dead) ~ base_factor, data=t0)
tab_model(factor_cox)
However, when attempting to use sjPlot::tab_model
to create a results table, I keep getting the error:
"Error in data.frame(..., stringsAsFactors = FALSE) : arguments imply differing number of rows: 0, 1"
This error does not appear in tab_model
for adjusted models for the same survival object and predictor with added covariates, just for this crude model.
I'd like to use sjPlot
for this, but unless I can figure this out I'll have to use another function for my table (stargazer, for example, works fine).