centered_fillin3: centered_fillin3

Description Usage Arguments Details Value Examples

View source: R/centered_fillin3.R

Description

This function returns the ratio of the number of zeros obtained from the cholesky decomposition of the specified precision matrix over the optimal cholesky fill-in for a centered 3-level gaussian hierarchical model. If the cholesky decomposition is optimal, the number returned is 1, and if it is sub-optimal the number returned is greater than 1. The function also returns the time taken for the cholesky decomposition.

Usage

1
2
centered_fillin3(method, permute_method = "none", i, j, k, permute = TRUE,
  ...)

Arguments

method

determines which linear algebra package to use

permute_method

determines how the precision matrix is permuted before use with the chosen linear algebra package

i

number of nodes at level 1

j

number of children nodes in level 2 per node at level 1

k

number of children nodes in level 3 per node at level 2

permute

determines whether or not to use default row permutation algorithm before matrix factorization to reduce fill-in

...

for other params used in centered_precgen3

Details

A choice of 2 packages is provided: spam and Matrix. A choice of 3 permute methods is provided: no permutation, random permutation, and depth-first permutation.

Value

the fill-in ratio with respect to the optimal fill-in, and the time taken for the cholesky decomposition

Examples

1
2
3
4
i <- 2
j <- 3
k <- 2
centered_fillin3(method = 'matrix', permute_method = 'random', i = i, j = j, k=k)

kwajiehao/ghInf documentation built on May 7, 2019, 10:58 a.m.