kaplan_meier_discrete

Calculate the state survival function using the Kaplan-Meier estimator resolved with respect to the states in the second discrete trajectory.

Given that a state transition occurred at time \(t_0\), calculate the probability that a compound is still in the new state at time \(t_0 + \Delta t\) given that the compound was in a specific state of another discrete trajectory at time \(t_0\).

Options

--f1

Name of the file containing the first discrete trajectory. The discrete trajectory must be stored as numpy.ndarray either in a binary NumPy .npy file or in a (compressed) NumPy .npz archive. See mdtools.file_handler.load_dtrj() for more information about the requirements for the input file.

--f2

Name of the file containing the second discrete trajectory. The second discrete trajectory must have the same shape as the first discrete trajectory.

--o-sf

Output filename for the file containing the values of the survival function.

--o-var

Output filename for the file containing the corresponding variance values.

-b

First frame to read from the discrete trajectory. Frame numbering starts at zero. Default: 0.

-e

Last frame to read from the discrete trajectory. This is exclusive, i.e. the last frame read is actually END - 1. A value of -1 means to read the very last frame. Default: -1.

--every

Read every n-th frame from the discrete trajectory. Default: 1.

--intermittency1

Allowed intermittency for the first discrete trajectory: Maximum number of frames a compound is allowed to leave its state whilst still being considered to be in this state provided that it returns to this state after the given number of frames. In other words, a compound is only considered to have left its state if it has left it for at least the given number of frames.

--intermittency2

Allowed intermittency for the second discrete trajectory.

--discard-neg-start

If provided, discard state leavings starting from negative states. Transitions from positive to negative states are regarded as proper state leaving.

--discard-all-neg

If provided, discard all state leavings starting from or ending in a negative state. This is different to --discard-neg-start in the sense that transitions from positive to negative states are treated as censored.

See also

mdtools.dtrj.kaplan_meier_discrete()

The underlying function that calculates the Kaplan-Meier estimate of the survival function

scripts.discretization.kaplan_meier

Calculate the state survival function using the Kaplan-Meier estimator

Notes

For more information about the survival function and the Kaplan-Meier estimator refer to mdtools.dtrj.kaplan_meier().

If you parse the same discrete trajectory to --f1 and --f2 you will get the survival function for each individual state of the input trajectory.