There is an error in the code. The function ggforest() does not exist in R. It seems like you are trying to create a forest plot using ggplot2, but the correct function to use is ggsurvplot() from the survminer package.

Here is the corrected code:

library(survival)
library(survminer)

model <- coxph(Surv(time, status) ~ Rap1 + TGFβ + p53, data = forestplot)
ggsurvplot(model, data = forestplot, main = 'Hazard ratio of Signaling pathways',
           cpositions = c(0.05, 0.15, 0.35), fontsize = 0.8,
           refLabel = 'reference', digits = 3)

This code will create a survival plot with the hazard ratios and 95% confidence intervals for the variables Rap1, TGFβ, and p53. The survival plot will be based on the Cox regression model

model - coxph Survtime status~Rap1+TGFβ+p53 data = forestplot f1=ggforestmodel #coxph得到的Cox回归结果 data = forestplot #数据集 main = Hazard ratio of Signaling pathways #标题 cpositio

原文地址: https://www.cveoy.top/t/topic/iKDQ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录