getTheta {gldrm} | R Documentation |
getTheta Updates theta. Vectorized but only updates observations that have not converged.
Description
getTheta Updates theta. Vectorized but only updates observations that have not converged.
Usage
getTheta(
spt,
f0,
mu,
sampprobs,
ySptIndex,
thetaStart = NULL,
thetaControl = theta.control()
)
Arguments
spt |
Support of the observed response variable. (This is the set of unique values observed, not the set of all possible values.) |
f0 |
Values of the baseline distribution corresponding to the values of spt |
mu |
The fitted mean for each observation. Note these values must lie strictly within the range of the support. |
sampprobs |
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. |
ySptIndex |
Vector containing index of each obervation's response value
within the |
thetaStart |
Vector of starting values. One value per observation. If
|
thetaControl |
Object of class |
Value
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 matchmu
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). Ifsampprobs=NULL
, thenfTiltSW
matchesfTilt
. -
bPrimeSW
Vector containing the mean for each observation, conditional on that observation being sampled. Ifsampprobs=NULL
, thenbPrimeSW
matchesbPrime
. -
bPrime2SW
Vector containing the variance for each observation, conditional on that observation being sampled. Ifsampprobs=NULL
, thenbPrime2SW
matchesbPrime2
. -
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.