An R package for Nonlinear Interactions Varying Coefficient Regression Model (INteractions Varying coefficiENTs)
The implementation has been done in C++ through the use of Rcpp and RcppArmadillo.
Authors: Davide Fabbrico and Matteo Pedone
Maintainer: Davide Fabbrico.
You can install the development version of invent from GitHub with:
# install.packages("devtools")
devtools::install_github("mattpedone/invent")
In this section, we will demonstrate a basic example to show how the
functions in the R package invent
work.
The R package contains various functions that are designed to perform
specific tasks. To showcase the functionality, we will go through a
simple example that illustrates the use of one of these functions. This
is what invent::gendata()
and invent::invMCMC()
do.
# Load the R package
library(invent)
# Generate synthetic data
data_list <- gendata(n_obs = 50, p = 10, scenario = 1, nnnc = 3)
# Run the regression model
out <- invMCMC(data_list$Y, data_list$X, iter = 100, burnin = 50, thin = 1)