get_pvalue: Summarize the test for equality across strata from a survival...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/get_pvalue.R

Description

S3 method for extracting information regarding equality across strata. No default method is available at the moment.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
get_pvalue(x, ...)

## S3 method for class 'survfit'
get_pvalue(
  survfit_object,
  ptype = "All",
  rho = NULL,
  statlist = c("test", "Chisq", "df", "p"),
  ...
)

Arguments

x

S3 object

...

other arguments passed on to the method

survfit_object

An object of class survfit

ptype

Character vector containing the type of p-value desired. Current options are "Log-Rank" "Wilcoxon" "Tarone-Ware" "Custom" "All". "Custom" allows the user to specify the weights on the Kaplan-Meier estimates using the argument 'rho'. The default is "All" displaying all types possible. When 'rho' is specified in context of "All", also a custom p-value is displayed.

rho

a scalar parameter that controls the type of test.

statlist

Character vector containing the desired information to be displayed. The order of the arguments determines the order in which they are displayed in the final result. Default is the test name ("test"), Chisquare test statistic ("Chisq"), degrees of freedom ("df") and p-value ("p").

Value

A tibble with summary measures for the Test of Equality Across Strata

Author(s)

Steven Haesendonckx

See Also

survdiff

Examples

1
2
3
4
5
6
7
8
library(survival)
library(dplyr)
library(tidyr)
library(ggplot2)

survfit_object <- vr_KM_est(data = adtte, strata = "TRTP")
get_pvalue(survfit_object)
 

visR-sandbox/visR-survival documentation built on Sept. 18, 2020, 6:21 p.m.