Survival logrankresult - CyrilB1531/lodestar GitHub Wiki
Development build. This page describes
main, not a released package. The latest published Lodestar.Survival is 0.2.0 — read its documentation.
Home › Survival › Survival estimators
LogRankResult
The outcome of a log-rank test, two groups or more.
public sealed record LogRankResult(double Statistic, double PValue, int DegreesOfFreedom)
Parameters — Statistic is the log-rank statistic, PValue its upper-tail chi-squared
probability, and DegreesOfFreedom is one for two groups and one fewer than the groups for more.
Example — two arms that cannot separate.
using Lodestar.Survival;
LogRankResult result = LogRank.Test(
[2, 4, 6], [true, true, true],
[2, 4, 6], [true, true, true]);
double statistic = result.Statistic; // => 0
double p = result.PValue; // => 1
int df = result.DegreesOfFreedom; // => 1
Remarks — Statistic is a quadratic form and is never negative. DegreesOfFreedom is a field
rather than a constant because LogRank.MultiGroup reports k − 1, and a
caller reading it should not have to know which test produced the record.
PValue comes from
Distributions.ChiSquaredSf, the same tail the
chi-squared tests in Lodestar.Stats report.
Applies to — net10.0, netstandard2.0.
See also — LogRank.Test.
Members
| Member | What it does |
|---|---|
LogRankResult.GetHashCode |
A hash consistent with the equality, every NaN alike. |