OptStiefelGBB.R
.Tensor Regression with Envelope Structure and Three Generic Envelope Estimation Approaches'' to
Tensor Regression with Envelope Structure’’.res <- kroncov(En)
to res <- try(kroncov(En))
in function TRR.fit
, which is forgotten to be reverted in last version.base::norm(x, 'F')
function with sqrt(sum(x^2))
for some matrix x
.Data
segment of the printout of the tensor
object, instead of just the first few elements, the summarized results of all elements are printed.OptManiMulitBallGBB()
to the output of ballGBB1D()
.TRR_sim -> TRRsim; TPR_sim -> TPRsim; TensEnv_dim -> TRRdim; ballGBB1D_bic -> oneD_bic; TensPLS_cv2d3d -> TPRdim; OptimballGBB1D -> OptM1D; EnvMU -> simplsMU
plot.Tenv
:
xlab = ""
, ylab = ""
, axes = TRUE
, ask = TRUE
, remove arguments xticks
, yticks
. axes
is a logical value specifying whether the axes should be drawn. If ask = TRUE
, user is prompted before the second plot is shown (if exists).ECD, simplsMU, manifold1D, manifoldFG, OptM1D, OptMFG
: Change optional arguments like maxiter
, tol
, to three dots ...
fun1D, get_ini1D, ballGBB1D, OptManiMulitBallGBB
: Collected into file “1Dfunction.R”. Help documentation are no longer supported.MenvU_sim
: An option wishart = FALSE
is provided to return the population matrices M
and U
. Other argument like jitter
is also provided which adds an scaler matrix to M
to ensures it positive-definiteness.PMSE
: Calculates the prediction and mean squared error for both TRR and TPR models.kroncov
: Add convergence criterion tol
and the maximal iteration maxiter
.OptStiefelGBB
: Hide out
from the output.manifoldFG
: Set default value for Gamma_init
.ttt.R
: Change arguments X,Y
to x,y
.oneD_bic
: Add the estimated envelope basis Gamma
to the output.TRRdim
: Output the mean squared error using the selected envelope basis.TRRdim, oneD_bic
: Argument multiD
is changed to C
to comply with the paper Zhang X, Mai Q (2018). “Model-Free Envelope Dimension Selection.” Electronic Journal of Statistics.OptMFG
: New FG optimization function encapsulating the core function OptStiefelGBB
.show
: overloads show
in package rTensor
. With the overloaded show
, only the first 6 elements of tensor is printed out.subspace()
, the formula of subspace distance should be ||P_{A} - P_{B}||_F/√{2d}.x
was not binary.TRR.fit()
and TPR.fit()
. They can be passed to argument x
.Tenv
class object, we remove S3 methods vcov.Tenv()
. Use function std_err()
if the standard error for the tensor coefficient from TRR.fit()
is desired.EEG
. Refer to R help documentation for more detailspredict.Tenv()
: if the argument newdata
is missing, the fitted values from the fitted model is returned.Xn
and Yn
in all functions to x
and y
in accordance with other popular functions, e.g., lm()
, glm()
, etc.plot.Tenv()
: Change the name of argument thrd
to level
.kroncov
: Data Tn
is centered before the estimation.summary.Tenv
.ask
in plot.Tenv.Gamma
list into bat
and square
datasets.bic_max
to maxdim
in TensEnv_dim
, max_iter
to maxiter
in manifold1D
, epsilon
to tol
in ECD
, G_ini
to Gamma_init
in manifoldFG
, G_hat
to Gamma
in manifoldFG
, Yhat
to pred
in PMSE
.TRR
, TPR
as TRR.fit
, TPR,fit
.print.Tenv
: Prints the call, coefficients from TPR
and TRR
, make the output more concise.print.summary.Tenv
: Print call, dimensions of X, Y, sample size, mse, the coefficient and p_value. (invoked implicitly when there is no assignment of summary.Tenv
).Xn
and Yn
in functions: TensEnv_dim
, TensPLS_cv2d3d
, Tenv
, Tenv_Pval
, TPR
and TRR
.mvtnorm
in DESCRIPTION
, it is not used in the package.Depends
in DESCRIPTION
to Imports
except for ManifoldOptim
.PMSE
, TensEnv_dim
, TensPLS_cv2d3d
, Tenv_Pval
.# Usage
> data("bat")
> data("square")
TPR
, TRR
:
Bhat
in the object returned from TPR
and TRR
is renamed as coefficients
.fitted.values
and residuals
into the output.Yn
can be vector or matrix and Xn
can be matrix, array or tensor for TPR
, Xn
can be vector or matrix and Yn
can be matrix, array or tensor for TRR
.FG_TRR
and FG_TPR
into TRR
and TPR
. Add one more option for method
, “FG”. Also add argument Gamma_init
for “FG” method.Tenv_Pval
: Change the data type of outputs from array to tensor. Change the name se_mat
to se
.PMSE
: Rewrite PMSE
. Xn
can be matrix, array or tensor, Yn
can be vector or matrix, and Bhat
can be vector, matrix, array or tensor as long as the dimensions match the ones of Xn
and Yn
.TRR_sim
, TPR_sim
: Add two simulation functions to generate data used in TRR and TPR which can help user quickly test the functions.Construct S3 object for TRR
and TPR
with class
attribute “Tenv”
> data("bat")
> fit <- TRR(bat$Xn, bat$Yn, method = "standard")
> class(fit)
> [1] "Tenv"
predict.Tenv
: Make predictions of new data.summary.Tenv
: Append dimensions of X,Y, sample size, mse, p_val and s.e. to the output object from TPR
and TRR
.plot.Tenv
: Draw the plot of coefficients from TRR
and TPR
, and draw p_val plot from TRR
.vcov.Tenv
: No covariance for coefficients. But for TRR
, we print the standard error for coefficients.fitted.default
: Calculates the fitted Y for TPR
and TRR
separately.residuals.default
: Calculate Y minus fitted Y for TPR
and TRR
coef.default
: Print the coefficients for TPR
and TRR
.FG_TPR
, FG_TRR
> Help pages for deprecated functions are available at help("TRES-deprecated")
.u=NULL
for TPR
and TRR
.maxdim=10
and nfold=5
for TensPLS_cv2d3d
PMSE
: now accept tensor Xn