Learn R Programming

⚠️There's a newer version (1.1.5) of this package.Take me there.

TRES

The package TRES implements the least squares and envelope estimation under the framework of tensor regression models. The general model-free envelope models can also be flexibly handled by the package via three types of envelope estimation algorithms:

  • Full Grassmannian (FG) algorithm.
  • 1D algorithm.
  • Envelope coordinate descent (ECD) algorithm
  • Partial least squares (PLS) type algorithm.

Installation

You can install the released version of TRES from CRAN with:

# Install devtools from CRAN
install.packages("TRES")

# Or the development version from GitHub:
devtools::install_github("jerryfsu3333/TRES")

Example

This is a basic example which shows you how to use function TRR.fit in Tensor Response Regression (TRR) model with least square.

library(TRES)
## Load data "bat"
data("bat")
x <- bat$x
y <- bat$y
fit <- TRR.fit(x, y, method="standard")

## Print cofficient
coef(fit)

## Print the summary
summary(fit)

## Make the prediction on the original dataset
predict(fit, x)

## Draw the plot of two-way coefficient tensor (or matrix)
plot(fit)

Copy Link

Version

Install

install.packages('TRES')

Monthly Downloads

220

Version

1.1.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Jing Zeng

Last Published

February 5th, 2020

Functions in TRES (1.1.1)

MenvU_sim

Generate sample estimator of M and U
OptManiMulitBallGBB

Line search algorithm for optimization on manifold
FG_TRR-deprecated

Envelope estimation of tensor response regression (TRR) with the full Grassmannian optimization
PMSE

Predictions and Mean squared error for tensor predictor regression (TPR).
FGfun

The Objective function and its gradient
TPR.fit

Tensor predictor regression
EEG

Electroencephalography (EEG) dataset for alcoholism study.
TensPLS_cv2d3d

Envelope dimension by cross-validation for tensor predictor regression (TPR).
get_ini1D

Initial value for 1D algorithm
fun1D

The 1D objective function and its gradient
predict.Tenv

Predict method for Tenv object.
TensPLS_fit-deprecated

Tensor envelope partial least squares (PLS) regression
EnvMU

Estimate envelope subspace basis
Tenv_Pval

The \(p\)-value and standard error of each element in the estimator of the tensor response regression (TRR) coefficient
Tenv-deprecated

Tensor response envelope estimator
OptStiefelGBB

Optimization on Stiefel manifold (GBB)
TPR_sim

Generate simulation data for tensor predictor regression (TPR)
OptimballGBB1D

Estimate the envelope subspace (Feasi 1D)
TRR_sim

Generate simulation data for tensor response regression (TRR)
FG_TPR

Deprecated functions in package TRES.
TensEnv_dim

Envelope dimension selection for tensor response regression (TRR)
FG_TPR-deprecated

Envelope estimation of tensor predictor regression (TPR) with the full Grassmannian optimization
kroncov

The covariance estimation of a tensor random variable
ballGBB1D_bic

Envelope dimension selection based on 1D-BIC
summary.Tenv

Summarize method for Tenv object.
bat

Bat simulated data
TRES-package

Tensor Regression with Envelope Structure and Three Generic Envelope Estimation Approaches
manifold1D

Estimate the envelope subspace (ManifoldOptim 1D)
std_err

Extracting the standard error.
TRR.fit

Tensor response regression
square

Square simulated data
manifoldFG

Estimate the envelope subspace (ManifoldOptim)
subspace

The distance between two subspaces.
ttt

Inner product of two tensors
plot.Tenv

Plot coefficients and p-value for Tenv object.
ECD

ECD algorithm for estimating the envelope subspace