hypsplit {lmreg} | R Documentation |
Testable and untestable hypotheses in linear model
Description
Reduces a general hypothesis in a linear model into a pair of completely testable and completely untestable hypotheses.
Usage
hypsplit(X, A, xi, tol=sqrt(.Machine$double.eps))
Arguments
X |
Design/model matrix or matrix containing values of explanatory variables (generally including intercept). |
A |
Coefficient matrix (A.beta = xi is the null hypothesis to be split). |
xi |
A vector (A.beta = xi is the null hypothesis to be tested). |
tol |
A relative tolerance to detect zero singular values while computing generalized inverse, in case X is rank deficient (default = sqrt(.Machine$double.eps)). |
Value
A list of two objects:
testable |
Coefficient matrix and constant vector for testable part of hypotheses. |
untestable |
Coefficient matrix and constant vector for untestable part of hypotheses. |
Author(s)
Debasis Sengupta <shairiksengupta@gmail.com>, Jinwen Qiu <qjwsnow_ctw@hotmail.com>
References
Sengupta and Jammalamadaka (2019), Linear Models and Regression with R: An Integrated Approach.
Examples
data(denim)
attach(denim)
X <- cbind(1, binaries(Denim), binaries(Laundry))
A <- rbind(c(0,1,0,0,0,0,0), c(0,0,1,0,0,0,0), c(0,0,0,1,0,0,0))
xi <- c(0,0,0)
hypotheses <- hypsplit(X, A, xi, tol=1e-13)
hypotheses[[1]] # testable
hypotheses[[2]] # untestable
detach(denim)