trans_w: This function transfers prior information into the weights

View source: R/higher_criticism.R

trans_wR Documentation

This function transfers prior information into the weights

Description

The weight is calculated with the equation: w=1/(a x prior_info+b x mean(prior_info)) and then scaled into mean(w)=1. Here we take a=0.95 and b=0.05.

Usage

trans_w(w)

Arguments

w

a numeric vector which is the original statistic for weight,need to be non-negative

Value

a numeric vector of the transfered weight with around mean~1, min~0.05. Missing values in input are transfered into 1

Examples

a=c(NA,exp(rnorm(7,0,1)))
trans_w(a)

mqzhanglab/wHC documentation built on April 1, 2022, 6:28 p.m.