get_lambda1: Compute lambda1 for BF null distribution

Description Usage Arguments Details References See Also Examples

View source: R/Get_lambda1.R

Description

Compute the lambda parameter of the Bayes factors null distribution. Using the standard SVD R routine.

Usage

1
get_lambda1(Y, confounder, sigma_b)

Arguments

Y

a vector of the variable of interest.

confounder

the confounding matrix with same a number of line equal to the length of Y. The intercept should not be included, if missing will generate a intercept matrix.

sigma_b

value of the prior used in the Wavelet screaming.

Details

Compute the lambda parameter of the Bayes factors distribution using its closed form which is provided in the paper of Quan Zhou and Yongtao Guan.

References

Quan Zhou and Yongtao Guan, On the Null Distribution of Bayes Factors in linear Regression, Journal of the American Statistical Association, 518, 2017.

See Also

get_ncp

Examples

1
2
3
4
5
6
## Not run: 
Y <- rnorm(n=1000)
sigma <-0.2
get_lambda1(Y=Y,sigma_b=sigma)

## End(Not run)

william-denault/ffw documentation built on Jan. 20, 2021, 8:28 p.m.