GLHtest: GLHtest

Description Usage Arguments Value Examples

View source: R/GLHtest.R

Description

General Linear Hypothesis Test

Usage

1
GLHtest(model, T, c = rep(0, nrow(T)))

Arguments

model

input fitted linear model

T

contrast matrix, each row specifies a linear combination of the coefficients

c

vector, specifying the null hypothis values for each linear combination, Default value is zero vector.

Value

F-statistics of the GLH test and corresponding p-value

Examples

1
2
3
4
5
6
7
n = 1e3
p = 20
Y = runif(n,-5,5)
X = matrix(rnorm(n*p,0,1),n,p)
T = matrix(sample(-5:5, p+1, replace = TRUE),nrow=1)
model = linearFit(X,Y)
GLHtest(model,T)

xietian99/LinearModel documentation built on Nov. 27, 2019, 12:31 a.m.