A generic method to compute the log-density values and possibly their first derivatives with respec to theta and beta.
logd(x, beta, pt, which)
a matrix, storing the log-density values for each (x[i], beta, pt[j], or NULL if not asked for.
a matrix, storing the log-density derivatives wrt beta for each (x[i], beta, pt[j], or NULL if not asked for.
a matrix, storing the log-density derivatives wrt theta for each (x[i], beta, pt[j], or NULL if not asked for.
an object of a class for data.
instrumental parameter in a semiparametric mixture.
a vector of values for the mixing variable theta.
an integer vector of length 3, indicating if,
respectively, the log-density values, the derivatives wrt beta
and the derivatives wrt theta are to be computed and returned if
being 1 (TRUE
).
Yong Wang <yongwang@auckland.ac.nz>