Learn R Programming

fido (version 1.0.4)

basset_fit: Interface to fit basset models

Description

Basset (A Lazy Learner) - non-linear regression models in fido

Usage

basset(
  Y = NULL,
  X,
  upsilon = NULL,
  Theta = NULL,
  Gamma = NULL,
  Xi = NULL,
  init = NULL,
  pars = c("Eta", "Lambda", "Sigma"),
  ...
)

# S3 method for bassetfit refit(m, pars = c("Eta", "Lambda", "Sigma"), ...)

Value

an object of class bassetfit

Arguments

Y

D x N matrix of counts (if NULL uses priors only)

X

Q x N matrix of covariates (cannot be NULL)

upsilon

dof for inverse wishart prior (numeric must be > D) (default: D+3)

Theta

A function from dimensions dim(X) -> (D-1)xN (prior mean of gaussian process)

Gamma

A function from dimension dim(X) -> NxN (kernel matrix of gaussian process)

Xi

(D-1)x(D-1) prior covariance matrix (default: ALR transform of diag(1)*(upsilon-D)/2 - this is essentially iid on "base scale" using Aitchison terminology)

init

(D-1) x Q initialization for Eta for optimization

pars

character vector of posterior parameters to return

...

other arguments passed to pibble (which is used internally to fit the basset model)

m

object of class bassetfit

Details

the full model is given by: $$Y_j \sim Multinomial(Pi_j)$$ $$Pi_j = Phi^{-1}(Eta_j)$$ $$Eta \sim MN_{D-1 x N}(Lambda, Sigma, I_N)$$ $$Lambda \sim GP_{D-1 x Q}(Theta(X), Sigma, Gamma(X))$$ $$Sigma \sim InvWish(upsilon, Xi)$$ Where Gamma(X) is short hand for the Gram matrix of the Kernel function.

Default behavior is to use MAP estimate for uncollaping the LTP model if laplace approximation is not preformed.