The null-distribution of the test statistics under
inequality constraints takes the form of mixtures of F-distributions.
This function computes these mixing weights (a.k.a chi-bar-square weights
and level probabilities). It can be used directly and is called by
the conTest
function.
con_weights_boot(VCOV, Amat, meq,
R = 9999L, parallel = c("no", "multicore", "snow"),
ncpus = 1L, cl = NULL, seed = NULL, verbose = FALSE, ...)
variance-covariance matrix of the data for which the weights are to be calculated.
constraints matrix restriktor
.
integer (default = 0) treating the number of
constraints rows as equality constraints instead of inequality
constraints. For example, if meq = 2
, this means that the
first two rows of the constraints matrix
integer; number of bootstrap draws for mix.bootstrap
.
The default value is set to 99999. Parallel support is available.
the type of parallel operation to be used (if any). If missing, the default is set "no".
integer: number of processes to be used in parallel operation: typically one would chose this to the number of available CPUs.
an optional parallel or snow cluster for use if parallel = "snow". If not supplied, a cluster on the local machine is created for the duration of the conTest call.
seed value.
logical; if TRUE, information is shown at each bootstrap draw.
no additional arguments for now.
The function returns a vector with the mixing weights
Silvapulle, M.J. and Sen, P.K. (2005, p.79). Constrained Statistical Inference. Wiley, New York.
# NOT RUN {
W <- matrix(c(1,0.5,0.5,1),2,2)
Amat <- rbind(c(0,1))
meq <- 0L
# we only generate 999 bootstrap samples in this
# example; in practice you may wish to use a much higher number.
wt.bar <- con_weights_boot(W, Amat, meq, R = 999)
wt.bar
# }
Run the code above in your browser using DataLab