betas: Compute Beta value from Frequentist or Bayesian linear...

Description Usage Arguments Details Value Examples

View source: R/betas.R

Description

Compute Beta value from Bayesian linear regression

Usage

1
betas(y, x, confounder, sigma_b = NA, all)

Arguments

y

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

x

numerical, variable to regress on.

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 Beta computation, set as NA by default. If not provided, performs a frequentist modeling

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 function computes the Likelihood ratio used for testing significance of a genetic region. In addition it computes the porportion of wavelets coefficients associated by level of resolution, and the Bayes factor used for this estimation. All the details of the computation can be found in our paper "Wavelet screening: a novel look to GWAS data"

Value

A named vector. First position the estimated value of the Lambda statistics, then the proportion of association per level of resolution then the computed Bayes Factor per wavelet coefficient.

Examples

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

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

## End(Not run)

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