write.IGLS(indata, dtafile, oldsyntax = FALSE, resp, levID, expl, rp, D = "Normal", nonlinear = c(0, 1), categ = NULL, notation = NULL, nonfp = NA, clre = NULL, Meth = 1, extra = FALSE, reset, rcon = NULL, fcon = NULL, maxiter = 20, convtol = 2, mem.init = "default", optimat = FALSE, weighting = NULL, fpsandwich = FALSE, rpsandwich = FALSE, macrofile, IGLSfile, resifile, resi.store = FALSE, resioptions, debugmode = FALSE, startval = NULL, namemap = sapply(colnames(indata), as.character), saveworksheet = NULL)FALSE if new syntax has been used in
Formula object, else specified as TRUE (to enable
back-compatibility).levID = c('level2', 'level1') where 'level2' is the higher
level).'Normal' (the default), 'Binomial', 'Poisson',
'Negbinom', 'Unordered Multinomial', 'Ordered Multinomial',
'Multivariate Normal', or 'Mixed'. In the case of the latter,
'Mixed' precedes the response types which also need to be listed in
D, e.g. c('Mixed', 'Normal', 'Binomial'); these need to be
be listed in the same order to which they are referred to in the
Formula object (see runMLwiN, Formula.translate,
Formula.translate.compat. 'Mixed' combinations can consist of
'Normal' and 'Binomial' or 'Normal' and 'Poisson'.N = 0 specifies marginal quasi-likelihood
linearization (MQL), whilst N = 1 specifies penalised quasi-
likelihood linearization (PQL); M = 1 specifies first order
approximation, whilst M = 2 specifies second order approximation.
nonlinear = c(N = 0, M = 1) by default. First order marginal
quasi-likelihood (MQL1) only option for single-level discrete response
models.NA(s) if no reference group; the third row states the number of
categories for each variable. Supports back-compatibility with R2MLwiN
versions 'class' means no multiple subscripts, whereas
'level' has multiple subscripts.NA if no
variable to be removed.demo(UserGuide07)
for an example.Meth = 0 estimation method is set to RIGLS. If Meth = 1
estimation method is set to IGLS (the default setting).TRUE, extra binomial, extra negative binomial,
extra Poisson or extra multinomial distributions assumed, else FALSE.length(levID) specifying the action to be
taken, at each level, if a variance parameter is estimated at a particular
iteration to be negative during estimation. Values specified in
ascending order of level hierarchy: if 0 a negative variance
estimate is reset to zero and so are any associated covariances; if 1
a negative variance estimate is reset to zero but not the associated
covariances; if 2 no resetting takes place. E.g. reset = c(0, 1)
to assign value 0 to level 1 and value 1 to level 2 of
two-level model.random.ui and random.ci in the constraints
option within estoptions (see runMLwiN). random.ci
is appended to the bottom row of random.ui.fixed.ui and fixed.ci in the constraints
option within estoptions (see runMLwiN). fixed.ci
is appended to the bottom row of fixed.ui.tol option within estoptions (see
runMLwiN). If value of convtol is m, estimation will be
deemed to have converged when the relative change in the estimate for all
parameters from one iteration to the next is less than 10(-m). Defaults to
value of 2 for m if not otherwise specified.'default', else specify a vector of length 5 corresponding
to the following order: number of levels; worksheet size in thousands of cells;
the number of columns; the number of explanatory variables; the number of group
labels.optimat = TRUE
if MLwiN gives the following error message 'Overflow allocating smatrix'.
This error message arises if one more higher-level units is extremely large
(contains more than 800 lower-level units). In this situation R2MLwiN's
default behaviour is to instruct MLwiN to allocate a larger matrix size to
the (R)IGLS algorithm than is currently possible. Specifying
optimat = TRUE caps the maximum matrix size at 800 lower-level units,
circumventing the MLwiN error message, and allowing most MLwiN
functionality.weightvar
the length of which corresponds
to the number of levels in the model, in descending order from highest level first.
The other is an option standardised which is TRUE or FALSE.fpsandwich = TRUE, robust or `sandwich' standard errors based on raw
residuals are used, if fpsandwich = FALSE (default) then standard,
uncorrected, IGLS or RIGLS computation used.rpsandwich = TRUE, robust or `sandwich' standard errors based on raw
residuals are used, if rpsandwich = FALSE (default) then standard,
uncorrected, IGLS or RIGLS `plug in' estimates used.TRUE) or not (FALSE).'variances' option calculates the posterior variances instead of
the posterior standard errors; the 'standardised', 'leverage',
'influence' and 'deletion' options calculate standardised,
leverage, influence and deletion residuals respectively; the
'sampling' option calculates the sampling variance covariance matrix
for the residuals; the 'norecode' option prevents residuals with
values exceedingly close or equal to zero from being recoded to missing; the
reflate option returns unshrunken residuals. Note that the default option is
resioptions = c('variance'); 'variance' cannot be used together
with the other options to calculate standardised, leverage, influence and
deletion residuals.FALSE: i.e. MLwiN is run in
the background. If TRUE the MLwiN GUI is opened, and then pauses after the model
has been set-up, allowing user to check starting values; pressing 'Resume macro'
will then fit the model. Once fit, pressing 'Resume macro' once more will save
the outputs to the workdir ready to be read by R2MLwiN. Users can
instead opt to 'Abort macro' in which case the outputs are not saved to the
workdir. This option currently
works for 32 bit version of MLwiN only (automatically switches unless
MLwiNPath or options(MLwiNPath)
has been set directly to the executable).FP.b corresponds to the estimates for the fixed
part; FP.v specifies the variance/covariance estimates for the fixed
part; RP.b specifies the variance estimates for the random part;
RP.v corresponds to the variance/covariance matrix of the variance
estimates for the random part.Rasbash, J., Steele, F., Browne, W.J. and Goldstein, H. (2012) A User's Guide to MLwiN Version 2.26. Centre for Multilevel Modelling, University of Bristol.
write.MCMC