CoxDeviance$information_derivative(linear_predictor, direction, sample_weight):
the derivative of the information in a direction of the linear
predictor, d/dt I(eta + t direction), as a symmetric
matrix-free operator (CoxInformationDerivative, with
%*%, t(), dim() and
as.matrix()), O(n) per product: for the
derivatives of log determinants, as in REML.inst/include has
coxdev.h and its implementation coxdev_impl.h,
all inline, so another package can compile against it with
LinkingTo: coxdev and
#include <coxdev.h>.LinkingTo: coxdev). The comparisons with survival
remain.glmnet::Cindex; strata (a model per
stratum, the block diagonal information, labels, strata of unequal sizes
against coxph); zero weights as dropped observations, for
every kind of ties; the caching of results; the problematic case of
tests/test_bad.py; the moments of the "fisher"
draws; edge cases (no failures, one failure, everyone failing at once,
entries at failure times, strata without failures, extreme linear
predictors) and finite differences of the derivatives under every
option; and the values of the Python package, draws of
sample_score() included, for a fixed data set.The first release of the R package. It runs the C++ library of the
Python package coxdev 0.3.0 and has the same interface:
CoxDeviance$new(...) in place of
CoxDeviance(...).
CoxDeviance$new() takes the response as vectors or as a
Surv object, with start times, strata (any labels), sample
weights, and Breslow’s or Efron’s ties.compute(): the deviance, its gradient and the diagonal
of its Hessian in the linear predictor; information(): the
information as a matrix-free operator.sample_score() and wild_score(): draws of
the score (multinomial, Bernoulli, Fisher’s noncentral hypergeometric,
wild).score_residuals(), schoenfeld_residuals()
and risk_set_variance(), a column at a time for a dense or
sparse design.baseline_hazard(), expected_events() and
survival_at_exit().c_index(): Harrell’s concordance index, in O(n log
n).All agree with the survival package, and the vignettes match the Python notebooks.