getTheta Updates theta. Vectorized but only updates observations that have not converged.
getTheta(
spt,
f0,
mu,
sampprobs,
ySptIndex,
thetaStart = NULL,
thetaControl = theta.control()
)List containing the following:
theta Updated values.
fTilt Matrix containing the exponentially tilted distribution for each
observation, i.e. f(y|X=x). Each column corresponds to an observation and sums to one.
bPrime Vector containing the mean of the exponentially tilted distribution
for each observation. Should match mu argument very closely.
bPrime2 Vector containing the variance of the exponentially tilted
distribution for each observation.
fTiltSW Matrix containing the exponentially tilted distribution for each
observation, conditional on that observation being sampled, i.e. f(y|X=x, S=1).
If sampprobs=NULL, then fTiltSW matches fTilt.
bPrimeSW Vector containing the mean for each observation, conditional
on that observation being sampled. If sampprobs=NULL, then bPrimeSW
matches bPrime.
bPrime2SW Vector containing the variance for each observation, conditional
on that observation being sampled. If sampprobs=NULL, then bPrime2SW
matches bPrime2.
llik Semiparametric log-likelihood, evaluated at the current beta
and f0 values. If sampling weights are used, then the log-likelihood is conditional
on each observation being sampled.
conv Convergence indicator.
iter Number of iterations until convergence was reached.
Support of the observed response variable. (This is the set of unique values observed, not the set of all possible values.)
Values of the baseline distribution corresponding to the values of spt
The fitted mean for each observation. Note these values must lie strictly within the range of the support.
Matrix of sampling probabilities. The number of rows should equal the number of observations, and the number of columns should equal the number of unique observed support points.
Vector containing index of each obervation's response value
within the spt vector. This is only needed to calculate the log-likelihood
after each update.
Vector of starting values. One value per observation. If
NULL, zero is used as the starting value for each observation.
Object of class thetaControl, which is a list of
control arguments returned by the thetaControl function.