Description Usage Arguments Details Value References See Also Examples
This function is largely a more user friendly wrapper around
optimPibbleCollapsed
and
uncollapsePibble
.
See details for model specification.
Notation: N
is number of samples,
D
is number of multinomial categories, Q
is number
of covariates, iter
is the number of samples of eta
(e.g.,
the parameter n_samples
in the function
optimPibbleCollapsed
)
1 2 3 4 5 6 |
Y |
D x N matrix of counts (if NULL uses priors only) |
X |
Q x N matrix of covariates (design matrix) (if NULL uses priors only, must be present to sample Eta) |
upsilon |
dof for inverse wishart prior (numeric must be > D) (default: D+3) |
Theta |
(D-1) x Q matrix of prior mean for regression parameters (default: matrix(0, D-1, Q)) |
Gamma |
QxQ prior covariance matrix (default: diag(Q)) |
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 |
... |
arguments passed to |
m |
object of class pibblefit |
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*X, Sigma, I_N)
Lambda \sim MN_{D-1 x Q}(Theta, Sigma, Gamma)
Sigma \sim InvWish(upsilon, Xi)
Where Gamma is a Q x Q covariance matrix, and Phi^-1 is ALRInv_D transform.
Default behavior is to use MAP estimate for uncollaping the LTP model if laplace approximation is not preformed.
an object of class pibblefit
JD Silverman K Roche, ZC Holmes, LA David, S Mukherjee. Bayesian Multinomial Logistic Normal Models through Marginally Latent Matrix-T Processes. 2019, arXiv e-prints, arXiv:1903.11695
stray_transforms
provide convenience methods for
transforming the representation of pibblefit objects (e.g., conversion to
proportions, alr, clr, or ilr coordinates.)
access_dims
provides convenience methods for accessing
dimensions of pibblefit object
Generic functions including summary
,
print
,
coef
,
as.list
,
predict
,
name
, and
sample_prior
name_dims
Plotting functions provided by plot
and ppc
(posterior predictive checks)
1 2 | sim <- pibble_sim()
fit <- pibble(sim$Y, sim$X)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.