Calculates the gradient term for U_g for the score statistic.
gamma_fd(l, HL_array, HR_array, tpos_all, obs_all,
temp_beta, A_i, no_l_all, gMat, a1, a2, d)The output is a vector containing the first derivative with respect to gamma.
Index of first outcome of interest.
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.
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.
n x q matrix of genetic information.
First shape parameter of beta parameter.
Second shape parameter of beta parameter.
Number of quadrature nodes.