Cov_Beta: Compute posterior variance Beta value from Bayesian linear...

Description Usage Arguments Details Value Examples

View source: R/Cov_Beta.R

Description

Compute posterior variance Beta value from Bayesian linear regression

Usage

1
Cov_Beta(y, confounder, sigma_b, all)

Arguments

y

phenotype vector/variable of interest, has to be numeric.

confounder

the confounding matrix with the same sample order as Y. The intercept should not be included, if missing will generate a intercept matrix.

sigma_b

the parameter of the NIG prior used for the Bayes Factor computation. We advised to set this value between 0.1 and 0.2

all

logical, if set as TRUE return all the Beta value (including the ones form the confounding factors). If set as FALSE only return the estimate for x, set as FALSE if missing.

Details

The Wavelet_screening performed reverse regression so variance for all posterior distribution are equal.

Value

A matrix variance covariance matrix

Examples

1
2
3
4
5
6
7
8
## Not run: 

x <- rnorm(1000)
y <- x+3
sigma_b <- 0.2
Cov_Beta(y=y,sigma_b = sigma_b,all=TRUE)

## End(Not run)

william-denault/WaveletScreaming documentation built on Jan. 23, 2021, 12:34 p.m.