FAnova: Bayesian functional ANOVA

Description Usage Arguments Value References Examples

View source: R/FAnova.R

Description

This function carries out Bayesian functional ANOVA using the Normal Inverse Gamma Markov Grove method of Ma and Soriano (2016).

Usage

1
2
3
FAnova(W, X, formula, nu = 5, is.kappa.fixed = FALSE, gamma.kappa = 0.3,
  eta.kappa = 0.1, n.samples = 500, transition.mode = "Markov",
  method = "Nelder-Mead")

Arguments

W

An object of class DWT.

X

Design matrix.

formula

An object of class formula.

nu

Hyperparameter controlling the heterogeneity in the noise variance.

is.kappa.fixed

If TRUE, gamma.kappa and eta.kappa are fixed. If FALSE gamma_kappa and eta_kappa are determined using Empirical Bayes.

gamma.kappa

Hyperparameter for the MT transition matrix.

eta.kappa

Hyperparameter for the MT transition matrix.

n.samples

Number of posterior draws.

transition.mode

Type of transition. The two options are Markov or Independent.

method

Method used for find maxmimum of marginal likelihood.

Value

An object of class grove.

References

Ma L. and Soriano J. (2016) Efficient functional ANOVA through wavelet-domain Markov groves. arXiv:1602.03990v2 [stat.ME] (https://arxiv.org/abs/1602.03990v2).

Examples

1
2
3
4
5
6
7
8
## Not run: 
data <- GenerateSyntheticAnova(st.dev = 5, n.replicates = 5)
W <- DWT(data$noisy.Y)
X <- data$X
ans <- FAnova(W, X, ~ 1 + factorA + factorB)
denoised.data <- InvDWT(ans, x = c(0, 0, 1, 0))
PlotFun(denoised.data)
## End(Not run)

grove documentation built on May 2, 2019, 5:55 a.m.

Related to FAnova in grove...