init_prior.default: Initialize the prior

View source: R/operation_on_prior.R

init_prior.defaultR Documentation

Initialize the prior

Description

generate list of object corresponding to the parameters of the prior

Usage

## Default S3 method:
init_prior(
  Y,
  X,
  prior,
  v1,
  indx_lst,
  lowc_wc,
  control_mixsqp,
  nullweight,
  gridmult = sqrt(2),
  ind_analysis,
  max_SNP_EM = 100,
  max_step_EM = 1,
  cor_small = FALSE,
  tol_null_prior = 0.001,
  ...
)

Arguments

Y

functional phenotype, matrix of size N by size J. The underlying algorithm uses wavelet which assume that J is of the form J^2. If J not a power of 2, susif internally remaps the data into grid of length 2^J

X

matrix of size n by p in

prior

Three choice are available "normal", "mixture_normal", "mixture_normal_per_scale"

v1

a vector of ones of length equal to nrow(Y)

indx_lst

list generated by gen_wavelet_indx for the given level of resolution, used only with class mixture_normal_per_scale

lowc_wc

wavelet coefficient with low count to be discarded

control_mixsqp

list of parameter for mixsqp function see mixsqp package

nullweight

numeric value for penalizing likelihood at point mass 0 (should be between 0 and 1)

gridmult

numeric used to control the number of component used in the mixture prior (see ashr package

ind_analysis

optional, specify index for the individual to be analysied, allow analyis data with different entry with NA if a vector is provided, then we assume that the entry of Y have NA at the same place, if a list is provide

Value

an object of the class "normal", "mixture_normal" or "mixture_normal_per_scale"


stephenslab/susiF.alpha documentation built on March 1, 2025, 4:28 p.m.