# Pvalue: Calculate statistics and p-values In leapp: latent effect adjustment after primary projection

## Description

Calculate F-statistics, t-statistics and corresponding p-values given multiple regression models under the null and alternative hypotheses.

## Usage

 `1` ``` Pvalue(dat, mod, mod0) ```

## Arguments

 `dat` An N genes by n arrays matrix of expression data `mod` An n by (s+1) design matrix under the full model (alternative), the first column is the primary predictor, s>=0 and the rest of the columns are additional covariates `mod0` An n by s design matrix under the null hypothesis, s>=0, should be the same as the 2:(s+1) columns of mod. If s=0, please set mod0 = `NULL`

## Value

 `p` An N by 1 vector of p-values one for each row of data. `tstat` An N by 1 vector of t-statistics for primary parameters. `fstat` An N by 1 vector of F-statistics for primary parameters. `coef` An N by (s+1) matrix of coefficients with respect to design matrix mod under the full model.

## Author(s)

Yunting Sun yunting.sun@gmail.com, Nancy R.Zhang nzhang@stanford.edu, Art B.Owen owen@stanford.edu

## Examples

 ```1 2 3 4 5 6 7 8 9``` ``` ## Not run: data(simdat) n = ncol(simdat\$data) mod = cbind(simdat\$g, rep(1,n)) mod0 = cbind(rep(1,n)) result = Pvalue(dimdat\$data,mod = mod, mod0 = mod0) ## End(Not run) ```

leapp documentation built on May 2, 2019, 2:12 p.m.