| ML2directInf {missreg} | R Documentation |
A sub-function called by MLdirectInf to provide the value, score vector
and information matrix at theta for the so-called profile loglikelihood
l_P(theta) of the form l(theta, delta) within each s-stratum
with stratified two-phase sampled data. It reduces to an unstratified approach when
nstrata=1.
ML2directInf(theta, nderivs = 2, modelfn, hmodelfn, x, y, Aposn,
Acounts, Bposn, Bcounts, hvalue, Cmult, delta,
off.set = matrix(0, dim(x)[1], dim(x)[3]), inxStrat,
control.inner = mlefn.control.inner(...), ...)
theta |
Starting values for parameters theta in the regression model. |
nderivs |
Number of derivatives to be calculated. Either 0 (loglikelihood value only), 1 (also return score vector), or 2 (also return information matrix). |
modelfn |
A class of sub-functions called by ML2directInf to supply
values and their derivatives with respect to the eta's (M linear predictors
with respect to theta) for the model of interest f(Y|X;theta). |
hmodelfn |
A class of sub-functions called by ML2directInf to supply
values and their derivatives with respect to the eta's for
pr(h_k|x_j;theta) under the same class of models. |
x |
A 3-dimensional array (R*C*M) specifying the covariates values,
with R the number of observations, C the length of theta and M the number of
linear predictors used. |
y |
The response of interest, can be eitehr a vector or matrix. |
Aposn |
A vector specifying the positions of those observations with the set of complete (x, y)-values from s-stratum. |
Acounts |
A vector specifying the frequency of each observation (n_i)
with the set of complete (x,y)-values from s-stratum. |
Bposn |
A vector specifying the positions of those observations with the
x-values observed in s-stratum; NULL in prospective sampling. |
Bcounts |
A vector specifying the frequency of each observation (m_j)
with the x-values observed in s-stratum; NULL in prospective sampling. |
hvalue |
The h_k^(s) in the loglikelihood. |
Cmult |
The r_k^(s) in the loglikelihood. |
delta |
The delta_j^(s) in the loglikelihood. |
off.set |
The offset provided in a matrix form (R*M) with R the number of observations and M the number of linear predictors used. |
inxStrat |
See ML2Inf. |
control.inner |
Specify control parameters for inner iterations nested within
the mlefn function call. See mlefn for details. |
... |
Further arguments passed to or from related functions. |
This is the core function in the direct approach to calculate the value, score vector
and observed information matrix at theta for the profile loglikelihood l_P(theta)
of the form
l^(s)(theta,delta^(s)) within each s-stratum.
It is an inner function called by MLdirectInf.
A list with the following components.
loglk |
Log-likelihood value obtained from the current theta values. |
score |
Score vector obtained from the current theta values when nderivs>=1;
NULL otherwise. |
inf |
Observed information matrix obtained from the current theta values when
nderivs=2; NULL otherwise. |
delta |
A vector of length J providing values for delta_j^(s) either as its entry values
or updated from the inner iterative process when Bposn is not NULL. |
Chris Wild, Yannan Jiang
Description of the missreg Library, Wild and Jiang, 2007.