BUILT-IN MATHEMATICA SYMBOL

LogRankTest

LogRankTest[{data1, data2, ...}]
tests for equal hazard rates among the using a log-rank type test.

LogRankTest[{data1, data2, ...}, wspec]
performs a weighted log-rank test with weights wspec.

LogRankTest[{data1, ...}, wspec, "property"]
returns the value of .

Details and OptionsDetails and Options

• LogRankTest performs a hypothesis test on the with null hypothesis that the true hazard rates of the populations are equal for all and alternative hypothesis that at least one is different for some value of .
• The number is generally taken to be the largest event time in the .
• By default, a probability value or -value is returned.
• A small -value suggests that it is unlikely that is true.
• The must be univariate .
• The can be a SparseArray or EventData object.
• LogRankTest is effectively based on where , , and are the observed number of events, the expected number of events based on the pooled sample, and some weights, respectively.
• For named weight methods, the weight at time , , is generally based on the number at risk , the number of events , the product limit estimator of the pooled sample, or a similar estimator of the pooled sample.
• The following weight specifications wspec can be given:
•  Fleming-Harrington weights with {,} fully specified Fleming-Harrington weights "name" use a named weight method
• The values of and can be any non-negative numbers.
• Specifying and yields Fleming-Harrington weights of the form .
• Possible named weight specifications include:
•  "AndersenPeto" "Equal" "Gehan" "Peto" "TaroneWare"
• For interval-censored data the Zhao-Zhao-Sun-Kim generalized log-rank test is used.
• LogRankTest[{data1, ...}, wspec, "HypothesisTestData"] returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
• LogRankTest[{data1, ...}, wspec, "property"] can be used to directly give the value of .
• Properties related to the reporting of test results include:
•  "AllTests" list of all applicable tests "AutomaticTest" test chosen if Automatic is used "DegreesOfFreedom" the degrees of freedom used in a test "EventTimes" list of time points used in the test "EventWeights" a list of weights used at each event time "PValue" list of -values "PValueTable" formatted table of -values "ShortTestConclusion" a short description of the conclusion of a test "TestConclusion" a description of the conclusion of a test "TestData" list of pairs of test statistics and -values "TestDataTable" formatted table of -values and test statistics "TestStatistic" list of test statistics "TestStatisticTable" formatted table of test statistics
• The following options can be given:
•  Method Automatic the method to use for computing -values SignificanceLevel 0.05 cutoff for diagnostics and reporting

ExamplesExamplesopen allclose all

Basic Examples (4)Basic Examples (4)

Compare hazard rates using some sample data:

 Out[2]=

Create a HypothesisTestData object for repeated property extraction:

 Out[3]=
 Out[4]=

Test some censored data:

A significant difference is detected at the 5% level:

 Out[2]=

Perform a weighted log-rank test:

Use a named weight scheme:

 Out[2]=

Use Fleming-Harrington weights:

 Out[4]=

Test for equal hazard rates with many samples:

A visual comparison of the survival rates:

 Out[2]=

A significant difference is not detected:

 Out[3]=