loop_lss
is the EM loop function for the LSS model to be utilised by various other higher level functions
Usage
loop_lss(
alldat,
xiold,
omega2old,
nuold,
mean.ind,
var.ind,
nu.ind,
para.space,
maxit,
eps,
int.maxit,
print.it
)
Arguments
- alldat
Dataframe containing all the data for the models. Outcome in the first column.
- xiold
Vector of initial location parameter estimates to be fit in the location model.
- omega2old
Vector of initial scale2 parameter estimates to be fit in the scale2 model.
- nuold
Vector of initial nu parameter estimates to be fit in the nu model.
- mean.ind
Vector containing the column numbers of the data in 'alldat' to be fit as covariates in the location model.
- var.ind
Vector containing the column numbers of the data in 'alldat' to be fit as covariates in the scale2 model. FALSE indicates a constant variance model.
- nu.ind
Vector containing the column numbers of the data in 'alldat' to be fit as covariates in the nu model. NULL indicates constant model.
- para.space
Parameter space to search for variance parameter estimates. "positive" means only search positive parameter space, "negative" means search only negative parameter space and "all" means search all.
- maxit
Number of maximum iterations for the main EM algorithm.
- eps
Very small number for the convergence criteria.
- int.maxit
Number of maximum iterations for the internal EM algorithm for the location and scale.
- print.it
Logical to indicate if the estimates for each iteration should be printed.
Value
A list of the results from the algorithm, including conv, reldiff, it, mean, xi.new, omega2.new, nu.new, fitted.xi
conv
: Logical argument indicating if convergence occurredit
: Total iterations performed of the EM algorithmreldiff
: the positive convergence tolerance that occured at the final iterationxinew
: Vector of location parameter estimatesomega2new
: Vector of scale squared parameter estimatesnunew
: Vector of shape parameter estimatesfitted.xi
: Vector of fitted location estimates