ic.est | R Documentation |
Function ic.est estimates a mean vector under linear inequality constraints, functions print.orest and summary.orest provide printed results in different degrees of detail.
ic.est(x, Sigma, ui, ci = NULL, index = 1:nrow(Sigma), meq = 0,
tol = sqrt(.Machine$double.eps))
## S3 method for class 'orest'
print(x, digits = max(3, getOption("digits") - 3), scientific = FALSE, ...)
## S3 method for class 'orest'
summary(object, display.unrestr = FALSE, brief = FALSE,
digits = max(3, getOption("digits") - 3), scientific = FALSE, ...)
x |
for for |
object |
for |
Sigma |
covariance or correlation matrix (or any multiple thereof)
of |
ui |
matrix (or vector in case of one single restriction only) defining the left-hand side of the restriction
where mu is the expectation vector of x;
the first few of these restrictions can be declared equality- instead
of inequality restrictions (cf. argument Rows of See |
ci |
vector on the right-hand side of the restriction (cf. |
index |
index numbers of the components of mu,
which are subject to the specified constraints
as |
meq |
integer number (default 0) giving the number of rows of ui that are used for equality restrictions instead of inequality restrictions. |
tol |
numerical tolerance value; estimates closer to 0 than tol are set to exactly 0 |
digits |
number of digits to be used in printing |
scientific |
if |
... |
further arguments to |
display.unrestr |
if TRUE, unrestricted estimate (i.e. |
brief |
if |
Function ic.est
heavily relies on package quadprog for determining
the optimizer. It is a convenience wrapper for solve.QP
from that package.
The function is guaranteed to work appropriately if the specified restrictions
determine a (translated) cone. In that case, the estimate is the projection along
matrix Sigma
onto one of the faces of that cone (including the interior
as the face of the highest dimension); this means that it minimizes the
quadratic form t(x-b)%*%solve(Sigma,x-b)
among all b that satisfy the
restrictions ui%*%b>=ci
(or, if specified by meq
,
with the first meq
restrictions equality instead of inequality restrictions).
Function ic.est
outputs a list with the following elements:
b.unrestr |
x |
b.restr |
restricted estimate |
Sigma |
as input |
ui |
as input |
ci |
as input |
restr.index |
index of components of mu, which are subject to the specified constraints as in input index |
meq |
as input |
iact |
active restrictions, i.e. restrictions that are satisfied with
equality in the solution, as output by |
Ulrike Groemping, BHT Berlin
See also ic.test
, ic.weights
,
orlm
, solve.QP
## different correlation structures
corr.plus <- matrix(c(1,0.9,0.9,1),2,2)
corr.null <- matrix(c(1,0,0,1),2,2)
corr.minus <- matrix(c(1,-0.9,-0.9,1),2,2)
## unrestricted vectors
x1 <- c(1, -1)
x2 <- c(-1, -1)
x3 <- c(10, -1)
## estimation under restriction non-negative orthant
## or first element equal to 0, second non-negative
ice <- ic.est(x1, corr.plus, ui=diag(c(1,1)), ci=c(0,0))
ice
summary(ice)
ice2 <-ic.est(x1, corr.plus, ui=diag(c(1,1)), ci=c(0,0), meq=1)
summary(ice2)
ic.est(x2, corr.plus, ui=diag(c(1,1)), ci=c(0,0))
ic.est(x2, corr.plus, ui=diag(c(1,1)), ci=c(0,0), meq=1)
ic.est(x3, corr.plus, ui=diag(c(1,1)), ci=c(0,0))
ic.est(x3, corr.plus, ui=diag(c(1,1)), ci=c(0,0), meq=1)
ic.est(x1, corr.null, ui=diag(c(1,1)), ci=c(0,0))
ic.est(x1, corr.null, ui=diag(c(1,1)), ci=c(0,0), meq=1)
ic.est(x2, corr.null, ui=diag(c(1,1)), ci=c(0,0))
ic.est(x2, corr.null, ui=diag(c(1,1)), ci=c(0,0), meq=1)
ic.est(x3, corr.null, ui=diag(c(1,1)), ci=c(0,0))
ic.est(x3, corr.null, ui=diag(c(1,1)), ci=c(0,0), meq=1)
ic.est(x1, corr.minus, ui=diag(c(1,1)), ci=c(0,0))
ic.est(x1, corr.minus, ui=diag(c(1,1)), ci=c(0,0), meq=1)
ic.est(x2, corr.minus, ui=diag(c(1,1)), ci=c(0,0))
ic.est(x2, corr.minus, ui=diag(c(1,1)), ci=c(0,0), meq=1)
ic.est(x3, corr.minus, ui=diag(c(1,1)), ci=c(0,0))
ic.est(x3, corr.minus, ui=diag(c(1,1)), ci=c(0,0), meq=1)
## estimation under one element restricted to being non-negative
ic.est(x3, corr.plus, ui=1, ci=0, index=1)
ic.est(x3, corr.plus, ui=1, ci=0, index=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.