Gradient of bivariate probit with partial observability
grad1(theta, X1, X2, Z, rho = 0, p = NULL, summed = T, fixrho = F)numeric vector of dimension equal to that of the free parameter space
numeric matrix of covariates for the first equation
numeric matrix of covariates for the second equation
numeric matrix or column vecotr of response observations
numeric value for rho if fixed
numeric precomputed probabilities of Pr(Y1=1,Y2=1)
logical if the gradient observations should be summed
logical if rho should be fixed
if summed is TRUE then the function returns the numeric column sum of the gradient matrix, else it returns a numeric vector with each entry a value of the gradient vector