Learn R Programming

DrBats

Feed longitudinal data into a Bayesian Latent Factor Model to obtain a low-rank representation. Parameters are estimated using a Hamiltonian Monte Carlo algorithm with STAN. See G. Weinrott, B. Fontez, N. Hilgert and S. Holmes, "Bayesian Latent Factor Model for Functional Data Analysis", Actes des JdS 2016.

Installation

To install the DrBats package, the easiest is to install it directly from Gitlab. Open an R session and run the following commands:

library(remotes) 
XXXX

Usage

Once the package is installed on your computer, it can be loaded into a R session:

library(DrBats)
help(package="DrBats")

Citation

As a lot of time and effort were spent in creating the DrBats method, please cite it when using it for data analysis:

G. Weinrott, B. Fontez, N. Hilgert and S. Holmes, Bayesian Latent Factor Model for Functional Data Analysis", Actes des JdS 2016.

You should also cite the DrBats package:

citation("DrBats")

See also citation() for citing R itself.

Copy Link

Version

Install

install.packages('DrBats')

Monthly Downloads

214

Version

0.1.6

License

GPL-3

Last Published

February 13th, 2022

Functions in DrBats (0.1.6)

calc.loglik

Calculate the log likelihood of the model
visbeta

Format scores output for visualization
visW

Plot the estimates for the latent factors
stanfit

A stanfit object fitted to the toydata
weighted.Deville

Perform a weighted PCA using Deville's method on a data matrix X that we project onto a histogram basis and weighted
toydata

A toy longitudinal data set
pca.Deville

Perform a PCA using Deville's method
histoProj

Project a set of curves onto a histogram basis
coda.obj

Convert a STAN objet to MCMC list
W.QR

Build and decompose a low-rank matrix W
coinertia.drbats

Perform Coinertia Analysis on the PCA of the Weighted PCA and Deville's PCA
drbats.simul

Main simulation function
modelFit

Fit a Bayesian Latent Factor to a data set using STAN
postdens

Calculate the unnormalized posterior density of the model
pca.proj.Xt

PCA data projected onto a histogram basis