fillin2: fillin2

Description Usage Arguments Details Value Examples

View source: R/fillin2.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 general 2-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
fillin2(method = "both", permute_method = "none", i, J, 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

vector specifying the number of children nodes in level 2 per node at level 1

permute

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

...

for other params used in centered_precgen2

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
i <- 2
J <- c(1,3)
fillin2(method = 'matrix', permute_method = 'random', i = i, J = J)

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