This function is used to define global settings and parameters that are used by fitsaemodel().
fitsaemodel.control(niter =40, iter = c(200,200), acc =1e-05, dec =0, decorr =0, init ="default", k_Inf =20000,...)
Arguments
niter: [integer] the maximum number of outer-loop iterations (default: niter = 40).
iter: [integer] the maximum number of inner-loop iterations. It can be a vector of size 2. The first element of the vector refers to the estimation of the regression coefficients beta; the second element refers to the estimation of the variance of the unit-level errors, v; the maximum number of iterations used to compute the ratio of variances, d, cannot be modified (default: iter = c(200, 200)).
acc: [numeric] numeric tolerance used in the termination rule of the iterative updating algorithms. It can be a vector of size 4. The positions 1:4 of the vector acc refer to 1: (overall) outer-loop, 2: regression coefficients, beta, 3: variance component, v, 4: ratio of variances d; default: acc = 1e-05.
dec: [integer] type of matrix square root (decomposition); dec = 0 for eigenvalue decomposition (default) or dec = 1 for Cholesky decomposition.
decorr: [integer] type of decorrelation of the residuals; decorr = 0: no robust decorrelation (default); decorr = 1: means are replaced by medians.
init: [character] method by which the main algorithm is initialized. By default, init = "default"
the algorithm is initialized by a robust fixed-effects estimator; alternatively, (and provided that the robustbase package is installed) one may choose one of the high-breakdown-point initial estimators: "lts" (fast least-trimmed squares, LTS, regression) or "s" (regression S-estimator). For more details on the initialization methods, see documentation of fitsaemodel().
k_Inf: [numeric] tuning constant of the robust estimator that represents infinity (default: k_Inf = 20000).
...: additional arguments (not used).
Details
Changing the default values of the parameters may result in failure of convergence or loss of convergence speed.
Returns
A list with entries
niter
iter
acc
k_Inf
init
dec
decorr
add
See Also
fitsaemodel()
Examples
# use the landsat datahead(landsat)# define the saemodel using the landsat datamodel <- saemodel(formula = HACorn ~ PixelsCorn + PixelsSoybeans, area =~CountyName, data = subset(landsat, subset =(outlier ==FALSE)))# summary of the modelsummary(model)# obtain the maximum likelihood estimates with, for instance, 'niter = 50'# number of outer-loop iterations (by default: niter = 40). Here, we use# 'niter = 50' for the sake of demonstration, not because it is needed.fitsaemodel("ml", model, niter =50)