hypsplit: Testable and untestable hypotheses in linear model

Description Usage Arguments Value Author(s) References Examples

View source: R/hypsplit.R

Description

Reduces a general hypothesis in a linear model into a pair of completely testable and completely untestable hypotheses.

Usage

1
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

1
2
3
4
5
6
7
8
9
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)

lmreg documentation built on May 2, 2019, 9:29 a.m.

Related to hypsplit in lmreg...