FTRTucker: Frequentist tensor regression with the Tucker decomposition

View source: R/405_FTRTucker.R

FTRTuckerR Documentation

Frequentist tensor regression with the Tucker decomposition

Description

Frequentist tensor regression with the Tucker decomposition

Usage

FTRTucker(
  input,
  ranks = NULL,
  epsilon = 1e-04,
  betas_LASSO = FALSE,
  G_LASSO = TRUE,
  step_limit = 1000
)

Arguments

input

An object of class TR_data that contains (at least) the elements y (a vector of response values) and X (an array of covariate values). Optionally, eta (a matrix of nuisance covariates) can also be included. Other list elements will be ignored.

ranks

The ranks to be used with the Tucker decomposition. This should be a vector with the same length as the tensor covariate for each subject.

epsilon

a value for the stopping rule of the algorithm. Specifically, this is the upper bound for the differences in the log-likelihood between two iterations of the algorithm.

betas_LASSO

(logical) Should the LASSO be applied to the betas in the Tucker tensor decomposition? Defaults to FALSE.

G_LASSO

(logical) Should the LASSO be applied to the core tensor in the Tucker tensor decomposition? Defaults to TRUE.

step_limit

The maximum number of steps that can be taken before deciding that the algorithm did not converge

Value

A list with elements gam (vector coefficient result), betas (tensor decomposition components), G (the core tensor in the tensor decomposition), B (the tensor coefficient), llik (the value of the log-likelihood) and total_time (time spent to complete the analysis).

Examples

## Not run: 
input <- TR_simulated_data()
results <- FTRTucker(input)

## End(Not run)

danieladamspencer/bayestensorreg documentation built on July 23, 2024, 10:14 a.m.