The restriktor() function computes the restricted estimates. The minimal requirement
for this function is a fitted unconstrained model object. currently, restriktor
can deal with the standard linear model (
lm), the robust estimation of
the linear model (
rlm), and the generalized linear model (
restriktor(object, constraints = NULL, se = "standard", B = 999, rhs = NULL, neq = 0L, mix.weights = "pmvnorm", mix.bootstrap = 99999L, parallel = "no", ncpus = 1L, cl = NULL, seed = NULL, control = NULL, verbose = FALSE, debug = FALSE, ...)
All available options and default settings are discussed below.
restriktor() syntax might look as follows:
restr.ANOVA <- restriktor(fit.ANOVA, constraints = myConstraints)
For the restriktor object is a
print() and a
function available. The
print() function gives a brief overview of
the restricted estimates.
Call: conLM.lm(object = fit.ANOVA, constraints = myConstraints) restriktor (0.1-70): restricted linear model: Coefficients: GroupActive GroupNo GroupPassive 10.125 12.350 11.375
summary() function provides a clear summary of the restricted
estimates, standard errors and p-values. In case of bootstrapped standard errors
confidence intervals are computed. The summary results can be requested as follows:
Call: conLM.lm(object = fit.ANOVA, constraints = myConstraints) Restriktor: restricted linear model: Residuals: Min 1Q Median 3Q Max -1.375 -0.850 -0.375 0.375 3.625 Coefficients: Estimate Std. Error t value Pr(>|t|) GroupActive 10.12500 0.61854 16.369 1.594e-10 *** GroupNo 12.35000 0.67757 18.227 3.771e-11 *** GroupPassive 11.37500 0.61854 18.390 3.344e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.5151 on 14 degrees of freedom Standard errors: standard Multiple R-squared remains 0.985 Generalized Order-Restricted Information Criterion: Loglik Penalty Goric -29.5348 2.8418 64.7533
The Generalized Order-Restrikted Information Criterion (GORIC) is for model selecting under (in)equality constraints and is demonstrated in example 6.
object: a fitted linear model object of class "lm", or a
fitted robust linear model object of class "rlm". For class "rlm",
MM estimation are supported. For the
loss function only the
bisquare is supported for now,
otherwise the function gives an error.
constraints: there are two ways to constrain parameters.
First, the constraint syntax consists of one or more text-based descriptions,
where the syntax can be specified as a literal string enclosed by single
quotes. Only the names of
coef(model) can be used as names. See
Second, the constraint syntax consists of a 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 (θ) by model. The rows
should be linear independent, otherwise the function gives an error. For
more information about constructing the matrix R and
see constraint syntax.
se: if "
standard" (default), conventional standard errors
are computed based on inverting the observed augmented information
matrix. If "
HC0" or just "
HC", heteroskedastic robust
standard errors are computed (a.k.a Huber White). The options "
HC5" are refinements of "
HC0". For more details about
heteroskedastic robust standard errors type
boot.standard", bootstrapped standard errors are computed using
standard bootstrapping. If "
boot.model.based" or "
bootstrapped standard errors are computed using model-based bootstrapping. If
none", no standard errors are computed.
B: integer; number of bootstrap draws for
default value is set to 999. Parallel support is available.
rhs: vector on the right-hand side of the constraints;
Rθ > rhs. The length of this vector equals the number of rows of the
constraint matrix R and consists of zeros by default. Note: only used if
constraint input is a matrix or vector.
neq: integer (default = 0) treating the number of constraint rows
as equality constraints instead of inequality constraints. For example,
neq = 2, this means that the first two rows of the constraint
matrix R are treated as equality constraints. Note: only used if constraint
input is a matrix or vector.
mix.weights: if "pmvnorm" (default), the chi-bar-square weights are computed
based on the multivariate normal distribution function with additional Monte
Carlo steps. If "boot", the chi-bar-square weights are computed using parametric
bootstrapping. If "none", no chi-bar-square weights are computed. The weights
are necessary in the restriktor.summary function for computing the GORIC.
Moreover, the weights are re-used in the iht function for computing the p-value
for the test-statistic, unless the p-value is computed directly via bootstrapping.
mix.bootstrap: integer; number of bootstrap draws for mix.weights = "boot".
The default value is set to 99999. Parallel support is available.
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 restriktor call.
seed: seed value.
control: a list of control arguments:
absval:tolerance criterion for convergence (default = sqrt(.Machine$double.eps)).
maxit:the maximum number of iterations for the optimizer (default = 10000). (currently not used).
tol:numerical tolerance value. Estimates smaller than
tolare set to 0 (default = sqrt(.Machine$double.eps)).
verbose: logical; if TRUE, information is shown at each
debug: if TRUE, debugging information about the constraints
is printed out.
...: no additional arguments for now.