# mixingWeights: function for computing the chi-bar-square weights based on... In restriktor: Restricted Statistical Estimation and Inference for Linear Models

## Description

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.

## Usage

 ```1 2 3``` ```con_weights_boot(VCOV, Amat, meq, R = 99999L, parallel = c("no", "multicore", "snow"), ncpus = 1L, cl = NULL, seed = NULL, verbose = FALSE, ...) ```

## Arguments

 `VCOV` variance-covariance matrix of the data for which the weights are to be calculated. `Amat` constraints matrix R (or a vector in case of one constraint) and defines the left-hand side of the constraint Rθ ≥ rhs, where each row represents one constraint. The number of columns needs to correspond to the number of parameters estimated (θ). The rows should be linear independent, otherwise the function gives an error. For more information about constructing the matrix R and rhs see `restriktor`. `meq` 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 R are treated as equality constraints. `R` integer; number of bootstrap draws for `mix.bootstrap`. The default value is set to 99999. `parallel` the type of parallel operation to be used (if any). If missing, the default is set "no". `ncpus` integer: number of processes to be used in parallel operation: typically one would chose this to the number of available CPUs. `cl` 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` seed value. `verbose` logical; if TRUE, information is shown at each bootstrap draw. `...` no additional arguments for now.

## Value

The function returns a vector with the mixing weights

## Author(s)

Leonard Vanbrabant and Yves Rosseel

## References

Silvapulle, M.J. and Sen, P.K. (2005, p.79). Constrained Statistical Inference. Wiley, New York.

## Examples

 ```1 2 3 4 5 6 7``` ```W <- matrix(c(1,0.5,0.5,1),2,2) Amat <- rbind(c(0,1)) meq <- 0L # we only generate 99 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 = 99) wt.bar ```

restriktor documentation built on Feb. 25, 2020, 5:08 p.m.