Calculates the first derivative term with respect to sigma^2.
ss_fd(l, phen, HL_array, HR_array, tpos_all, obs_all,
apply_diffs, temp_beta, A_i, no_l_all, k, d)The output is a single value for the first derivative with respect to sigma.
Index of first outcome of interest.
List containing all the left and right design matrices.
n x k matrix containing all the hazard values for the left times.
n x k matrix containing all the hazard values for the right times.
n x k matrix containing a indictor for whether that time is left-censored or not.
n x k matrix containing a indictor for whether that time is right-censored or not.
Matrix containing the differences between survival functions of the left and right time intervals.
vector of fitted coefficients.
Product of apply_diffs across all outcomes k summed over all quadrature nodes d.
n x (k - 1) matrix containing the product of apply_diffs across all outcomes k excluding the current outcome l.
Total number of outcomes.
Number of quadrature nodes.