R: Single tests

singleTests {bigstep} | R Documentation

## Single tests

### Description

Perform the likelihood ratio tests between two regression models: 1) with only the intercept, 2) with the intercept and every single variable from the matrix `X`.

### Usage

    singleTests(X, y, fitFun = fitLinear, fastST = FALSE, maxp = 1e+06,
      verbose = TRUE)

### Arguments

`X` | a numeric matrix or an object of class big.matrix (see 'Details'). The rows of `X` contain the samples, the columns of `X` contain the observed variables. If your have variables in rows, see 'Details'.
`y` | a numeric vector of responses. The length of `y` must equal the number of rows of `X`.
`fitFun` | a function which fits the regression model and calculate the logarithm of the likelihood function (loglike). You can use your own function or one of these: `fitLinear`, `fitLogistic`, `fitPoisson`.
`fastST` | a logical. If `TRUE`, the Pearson correlation coefficients between `y` and all columns of `X` are calculated instead of the likelihood ratio tests (see ?bigstep). It is faster but works only if you do not have any missing values.
`maxp` | a numeric. If `X` is big, it will be splitted into parts with `maxp` elements. It will not change results, but it is necessary if your computer does not have enough RAM. Set to a lower value if you still have problems.
`verbose` | a logical. Set `FALSE` if you do not want to see any information during the selection procedure.

### Value

A numeric vector with p-values of the likelihood ratio test (or the Pearson correlation test if `fastST=TRUE`).

### Examples

    set.seed(1)
    n <- 100
    M <- 10
    X <- matrix(rnorm(M*n), ncol=M)
    y <- X[, 2] - X[, 3] + X[, 6] - X[, 10] + rnorm(n)
    singleTests(X, y)

[Package bigstep version 0.7.4 Index]