HDGLM_test: Tests the Coefficients of High Dimensional Generalized Linear...

Description Usage Arguments Value Note Author(s) References Examples

Description

Tests for whole or partial regression coefficient vectors for high dimensional generalized linear models.

Usage

1
HDGLM_test(Y, X, beta_0 = NULL, nuisance = NULL, model = "gaussian")

Arguments

Y

a vector of observations of length n, where n is the sample size.

X

a design matrix with n rows and p columns, where p is the dimension of the covariates.

beta_0

a vector with length p. It is the value of regression coefficient under the null hypothesis in global test. The default is β_0=0 and it can be non-zero in the global test. In the test with nuisance coefficients, we only deal with β_0^{(2)}=0.

nuisance

an index indicating which coefficients are nuisance parameter. The default is "NULL" (the global test).

model

a character string to describe the model and link function. The default is "gaussian", which denotes the linear model using identity link. The other options are "poisson", "logistic" and "negative_binomial" models, where the poisson and negative binomial models using log link.

Value

An object of class "HDGLM_test" is a list containing the following components:

test_stat

the standardized test statistic

test_pvalue

pvalue of the test against the null hypothesis

Note

In global test, the function "HDGLM_test" can deal with the null hypothesis with non-zero coefficients (β_0). However, in test with nuisance coefficient, the function can only deal with the null hypothesis with zero coefficients (β_0^{(2)}) in this version.

Author(s)

Bin Guo

References

Guo, B. and Chen, S. X. (2015). Tests for High Dimensional Generalized Linear Models.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## Example: Linear model
## Global test: if the null hypothesis is true (beta_0=0)
alpha=runif(5,min=0,max=1)
## Generate the data
DGP_0=DGP(80,320,alpha)
result=HDGLM_test(DGP_0$Y,DGP_0$X)
## Pvalue
result$test_pvalue

## Global test: if the alternative hypothesis is true
## (the square of the norm of the first 5 nonzero coefficients to be 0.2)
## Generate the data
DGP_0=DGP(80,320,alpha,sqrt(0.2),5)
result=HDGLM_test(DGP_0$Y,DGP_0$X)
## Pvalue
result$test_pvalue

## Test with nuisance coefficients: if the null hypothesis is true (beta_0^{(2)}=0)
## The first 10 coefficients to be the nuisance coefficients
betanui=runif(10,min=0,max=1)
## Generate the data
DGP_0=DGP(80,320,alpha,0,no=NA,betanui)
result=HDGLM_test(DGP_0$Y,DGP_0$X,nuisance=c(1:10))
## Pvalue
result$test_pvalue

## Test with nuisance coefficients: if the alternative hypothesis is true
## (the square of the norm of the first 5 nonzero coefficients in beta_0^{(2)} to be 2)
## The first 10 coefficients to be the nuisance coefficients
betanui=runif(10,min=0,max=1)
## Generate the data
DGP_0=DGP(80,330,alpha,sqrt(2),no=5,betanui)
result=HDGLM_test(DGP_0$Y,DGP_0$X,nuisance=c(1:10))
## Pvalue
result$test_pvalue


Search within the HDGLM package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.