Calculate the first derivative of the theta terms for outcome l.
fd_term(l, temp_beta, phen,d, apply_diffs,
A_i, no_l_all,HL_array, HR_array)The output is a 1 x (p + 2) vector of the first derivative terms for outcome l.
Outcome of interest.
Vector of fitted coefficients.
list containing the covariate design matrices.
Number of quadrature nodes.
Matrix containing the differences between survival functions of the left and right time intervals.
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.
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.