In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how to carry out the survival analysis of the R language in big data. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
According to the introduction of survival analysis above, we can have a general understanding of the concept and principle of survival analysis and the drawing of KM curve. However, the results of COX regression in survival analysis are not easy to output directly. Here is a simple introduction to a custom function, batch and regular output method.
# load the required R package
Library ("survival") library ("survminer")
# load and view the dataset
Data ("lung") head (lung)
Inst time status age sex ph.ecog ph.karno pat.karno meal.cal wt.loss1 3 306 2 74 11 90 100 1175 NA2 3 455 2 68 10 90 90 1225 153 3 1010 1 56 10 90 90 NA 154 5 210 2 57 11 90 60 1150 115 1 883 2 60 10 100 90 NA 06 12 1022 1 74 1150 80 513 0
# cox regression analysis
Res.cox | z |) sex-0.5310 0.5880 0.1672-3.176 0.00149 * *-Signif. Codes: 00.1exp (coef) exp (- coef) lower .95 upper .95sex 0.588 1.701 0.4237 0.816Concordance0.579 (se = 0.022) Rsquare= 0.046 (max possible= 0.999) Likelihood ratio test= 10.63 on 1 df, p=0.001111Wald test= 10.09 on 1 df P=0.001491Score (logrank) test = 10.33 on 1 df, pendant 0.001312
COX regression results need to extract the confidence interval of HR,HR, wald.test and p.value information, the simplest thing is to copy and paste in the summary results, of course, the efficiency is very low. Suppose what happens when there are hundreds of variables?
-copy and paste N* hundreds of times!
You can also build custom functions that output COX regression results of all variables at a time in the form of a data box.
# View the variables to be analyzed
Covariates
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.