jtimonen / lgpr

R-package for interpretable nonparametric modeling of longitudinal data using additive Gaussian processes. Contains functionality for inferring covariate effects and assessing covariate relevances. Various models can be specified using a convenient formula syntax.
https://jtimonen.github.io/lgpr-usage/
25 stars 1 forks source link
bayesian-inference gaussian-processes longitudinal-data r-packages stan

lgpr

travis coverage CRAN_Status_Badge metacran downloads license

R-package for interpretable nonparametric modeling of longitudinal data using additive Gaussian processes. Contains functionality for inferring covariate effects and assessing covariate relevances. Various models can be specified using a convenient formula syntax.

[!NOTE] Using this package is computationally viable if your data set has maybe less than 300 observations. But the much more scalable lgpr2 package has been released! It is much faster but unfortunately doesn't have all the special modeling features included in this package.

Getting started

See overview, tutorials, vignettes and documentation at https://jtimonen.github.io/lgpr-usage/index.html.

Requirements

Installing from CRAN

Installing from source

Using R < 4.2

If you are using R version 4.1 or earlier, you can get an error

cc1plus.exe: out of memory allocating 65536 bytes
make: *** [C:/PROGRA~1/R/R-40~1.2/etc/i386/Makeconf:227: stanExports_lgp_latent.o] Error 1

because both 64-bit and 32-bit versions of the package are getting installed. To disable this and resolve error, ugrade to latest R or install the version that has Biarch: false by

devtools::install_github('jtimonen/lgpr', ref = "no-biarch")

Real data and reproducing the experiments

For code to reproduce the experiments of our manuscript see https://github.com/jtimonen/lgpr-usage. Preprocessed longitudinal proteomics data is also provided there. See also the built-in read_proteomics_data() function.