View source: R/confint_and_auxiliary.R
anova.islasso | R Documentation |
Tests general linear hypotheses and computes confidence intervals for linear combinations of coefficients
from a fitted islasso
model.
## S3 method for class 'islasso'
anova(object, A, b = NULL, ci, ...)
object |
A fitted model object of class |
A |
Hypothesis specification. Either:
|
b |
Right-hand side vector for the null hypotheses |
ci |
Optional 2-column matrix of confidence intervals for coefficients. |
... |
Currently unused. |
The method tests the null hypothesis H_0: A \beta = b
, where A
and b
define a linear constraint on model coefficients.
Symbolic expressions support natural syntax: coefficients may be added/subtracted, constants may be multiplied (e.g. "2 * X1 + 3 * X2 = 7"
).
Equations with omitted =
assume zero on the right-hand side. See examples for syntax flexibility.
An object of class "anova.islasso"
containing:
Estimate |
Linear combination estimates |
SE |
Standard errors |
Wald |
Wald statistics |
p-value |
Associated p-values |
Gianluca Sottile gianluca.sottile@unipa.it
islasso
, summary.islasso
, confint.islasso
,
predict.islasso
, logLik.islasso
, residuals.islasso
n <- 100; p <- 100
beta <- c(runif(10, -2, 2), rep(0, p - 10))
sim <- simulXy(n = n, p = p, beta = beta, seed = 1, family = gaussian())
fit <- islasso(y ~ . -1, data = sim$data, family = gaussian())
# Test if first 5 variables sum to -7.5
anova(fit, A = c("X1 + X2 + X3 + X4 + X5 = -7.5"))
# Test multiple hypotheses
anova(fit, A = c("X1 + X2 + X3 + X4 + X5", "X6 + X7 + X8 + X9 + X10"), b = c(-7.5, 8.75))
# Full diagonal comparison to true coefficients
anova(fit, A = diag(p), b = beta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.