Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

modelFit

Fit a Bayesian Latent Factor to a data set using STAN


Description

Fit a Bayesian Latent Factor to a data set using STAN

Usage

modelFit(
  model = "PLT",
  var.prior = "IG",
  prog = "stan",
  parallel = TRUE,
  Xhisto = NULL,
  nchains = 4,
  nthin = 10,
  niter = 10000,
  R = NULL
)

Arguments

model

a string indicating the type of model ("PLT", or sparse", default = "PLT")

var.prior

the family of priors to use for the variance parameters ("IG" for inverse gamma, or "cauchy")

prog

a string indicating the MCMC program to use (default = "stan")

parallel

true or false, whether or not to parelleize (done using the package "parallel")

Xhisto

matrix of simulated data (projected onto the histogram basis)

nchains

number of chains (default = 2)

nthin

the number of thinned interations (default = 1)

niter

number of iterations (default = 1e4)

R

rotation matrix of the same dimension as the number of desired latent factors

Value

stanfit, a STAN object

Author(s)

Gabrielle Weinrott

References

The Stan Development Team Stan Modeling Language User's Guide and Reference Manual. http://mc-stan.org/


DrBats

Data Representation: Bayesian Approach That's Sparse

v0.1.5
GPL-3
Authors
Anne Bisson [cre], Gabrielle Weinrott [aut], Brigitte Charnomordic [aut], Benedicte Fontez [aut], Nadine Hilgert [aut], Susan Holmes [aut]
Initial release
2019-11-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.