survminer | Survival Analysis and Visualization | Data Visualization library

 by   kassambara R Version: v0.4.9 License: No License

kandi X-RAY | survminer Summary

kandi X-RAY | survminer Summary

survminer is a R library typically used in Analytics, Data Visualization applications. survminer has no vulnerabilities and it has low support. However survminer has 152 bugs. You can download it from GitHub.

The survminer R package provides functions for facilitating survival analysis and visualization. The main functions, in the package, are organized in different categories as follow. Diagnostics of Cox Model . Summary of Cox Model .
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              survminer has a low active ecosystem.
              It has 429 star(s) with 149 fork(s). There are 29 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 245 open issues and 285 have been closed. On average issues are closed in 107 days. There are 16 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of survminer is v0.4.9

            kandi-Quality Quality

              survminer has 152 bugs (0 blocker, 0 critical, 66 major, 86 minor) and 0 code smells.

            kandi-Security Security

              survminer has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              survminer code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              survminer does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              survminer releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 9995 lines of code, 0 functions and 49 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of survminer
            Get all kandi verified functions for this library.

            survminer Key Features

            No Key Features are available at this moment for survminer.

            survminer Examples and Code Snippets

            No Code Snippets are available at this moment for survminer.

            Community Discussions

            QUESTION

            Cox regression stratified by another column than the predictor
            Asked 2022-Apr-08 at 23:00

            I would like to perform a cox regression analysis with value_max_min as predictor, but according 2 groups peakand drop in the column peak_drop_status(to get 2 survival curves).

            ...

            ANSWER

            Answered 2022-Apr-08 at 23:00

            To do a stratified Cox model, you would specify strata(var) in your model formula as follows:

            Source https://stackoverflow.com/questions/71788886

            QUESTION

            How to change the y-axis of the censoring table in ggsurvplot in R?
            Asked 2022-Apr-04 at 18:06

            The ggsurvplot function from the package survminer allows users to draw Kaplen-Meier curves. It also allows us to create a table beneath the plot with the number of censored observations by configuring the ncensor.plot value. My question is: how does one change the y-axis of the censored table beneath the plot? The reason is I have a study termination at for example 52 weeks, and therefore the amount of censored observations is high, skewing the table completely. See the example below.

            ...

            ANSWER

            Answered 2022-Apr-04 at 18:06

            The object returned by ggsurvplot is a list which contains the main plot as an element called plot and the censored table plot as an element named ncensor.plot. Both of which are ggplot objects and can therefore be tweaked using default ggplot options. As an example in my code below I use scale_y_continuous to change the breaks of the y scale for the censored table plot:

            Source https://stackoverflow.com/questions/71741304

            QUESTION

            How to insert output from Cox regression on the graph
            Asked 2022-Apr-01 at 14:38

            I have got survival data, based on quartiles of delta_mon1_baselone_to_3d. Outcomes is mace.

            Cox regression for each quartile are obtained with this code:

            ...

            ANSWER

            Answered 2022-Apr-01 at 14:38

            This is what I think you're looking for. First, it isn't built into that plotting function to do this, but you can create these labels dynamically.

            It ended up being a bit easier if I changed the name of stratum to Quartile. If that's what you're labeling it, this shouldn't be too big of an issue.

            Source https://stackoverflow.com/questions/71683969

            QUESTION

            ggsurvplot (Survminer) Customising the title (adding italics)
            Asked 2022-Mar-30 at 11:26

            I am looking to customise my ggsurvplot title by making one word in it be in italics. I have tried the more 'classic' code that words in ggplots, but they don't appear to work in this.

            Here is an example of what I am doing:

            ...

            ANSWER

            Answered 2022-Mar-30 at 11:26

            You can use an expression like this:

            Source https://stackoverflow.com/questions/71675903

            QUESTION

            Is there a way to "horizontally merge" two Kaplan-Meier curves of the same dataset with two consecutive time-to-event variables?
            Asked 2022-Mar-24 at 12:44

            I have a dataset consisting in observations of the developmental time and survival of an insect.

            Developmental time is the time in days between egg exclosure and adult emergence, while survival of adults is the time between adult emergence and death (or censoring).

            In my analysis, I am plotting a Kaplan-Meier reversed survival curve (ggsurvplot(survfit_obj, fun = "event")) for developmental time, while for adult survival I am using a classical Kaplan-Meier curve.

            Since I have these two time-to-event variables for every unique individual, I am wondering if there is the possibility to horizontally merge the two resulting Kaplan-Meier curves into a single comprehensive one, or eventually with a different estimator.

            Actually, I am not even sure if it has a solid statistical meaning, it just graphically make sense (see last figure).

            Keep in mind that the two time-to-events variables are substantially different, they are not representing a single recurrent event.

            Below you can find my reproducible example.

            Variable legend:

            • treat -> treatment

            • days2emerge -> days from egg to adult

            • new.ad = 1 -> successful adult emergence

            • days2event -> days from adult emergence to death/censoring

            • days2event = 1 -> adult death

            • days2event = 0 -> adult censoring

            ...

            ANSWER

            Answered 2022-Mar-24 at 12:44

            I don't think you can do this natively in ggsurvplot, but you can strip the data out of your plots and easily build a new one:

            Source https://stackoverflow.com/questions/71601759

            QUESTION

            How to replace the default `geom_ribbon` with `geom_errorbar` in `ggcompetingrisks` from `survminer` package?
            Asked 2021-Nov-29 at 04:58

            How to replace the default geom_ribbon with geom_errorbar in ggcompetingrisks from survminer package?

            conf.int = T will put confidence interval as a ribbon layer.

            my code:

            ...

            ANSWER

            Answered 2021-Nov-29 at 04:58

            You can modify the source code of the two required functions from the survminer package (ggcompetingrisks.cuminc() & ggcompetingrisks()), e.g.

            Source https://stackoverflow.com/questions/70149816

            QUESTION

            Why does the surv_pvalue (or any other) function not work inside a custom function in R?
            Asked 2021-Nov-10 at 01:26

            To generate p-values for the differences between two survival curves, I need to perform a tedious series of steps, which need to be repeated with all combinations of two out of three values that are represented in one column of the starting data frame, say groups A, B and C:

            ...

            ANSWER

            Answered 2021-Nov-10 at 01:26

            I think the problem is that you are not calling survfit in the manner it was intended. The Surv-object should have the column names, but not the dataset name in it.

            You also need to provide survminer::surv_pvalue a dataset as a second parameter

            Try (works for me):

            Source https://stackoverflow.com/questions/69869327

            QUESTION

            Change xlim to cartesion coordinates in ggsurvplot
            Asked 2021-Oct-29 at 15:04

            I want to create a KM curve with 95%-CI with the x-axis zoomed in to show values between 0-60 months. This all works fine with ggsurvplot untill I use xlim.

            ...

            ANSWER

            Answered 2021-Oct-29 at 15:04

            When you zoom in in the plot of the surv_graph, with the ggsurvplot-argument xlim, or with + coord_cartesian(...) afterwards, then the table is automatically adjusted to show only the data in the plot. This may be worthy of a change request for the package. In the meanwhile, the code below may be a workaround.

            ggsurvplot() creates an object of 4 lists: one of them contains the graph, another one contains the table. Extracting those 2 and "arranging" them ggarrange() may create a suitable graph. Prior to that ggarrange-operation we "zoom in" on the surv-plot with coord_cartestion(xlim= ...):

            Source https://stackoverflow.com/questions/69724392

            QUESTION

            R Survminer Pairwise Survival difference Variable length error
            Asked 2021-Oct-01 at 18:56

            Hello I am using the survival package and the survminer package to do some analysis. I am having trouble with pairwise_survdiff from the survminer package.

            Here is some simulated data that mimics my own.

            ...

            ANSWER

            Answered 2021-Oct-01 at 18:56

            Try without using the df$

            Source https://stackoverflow.com/questions/69410754

            QUESTION

            How to calculate confidence intervals for drug retention rates using survival analysis
            Asked 2021-Sep-18 at 18:26

            I am new to survival analysis in R. I saw that my collegues managed to find drug retention rates at specific time intervals (6 month, 12 month, 24 month) with 95% CI. How would I do this?

            Here is a reproducible example:

            ...

            ANSWER

            Answered 2021-Sep-18 at 18:26

            You could use summary with the needed time intervals: this will give the needed CI's.

            Source https://stackoverflow.com/questions/69236614

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install survminer

            Install from [CRAN](https://cran.r-project.org/package=survminer) as follow:.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link