envlp : A MATLAB Toolbox for Computing Envelope Estimators in Multivariate Analysis

Envelope models and methods represent new constructions that can lead to substantial increases in estimation efficiency in multivariate analyses. The envlp toolbox implements a variety of envelope estimators under the framework of multivariate linear regression, including the envelope model, partial envelope model, heteroscedastic envelope model, inner envelope model, scaled envelope model, and envelope model in the predictor space. The toolbox also implements the envelope model for estimating a multivariate mean. The capabilities of this toolbox include estimation of the model parameters, as well as performing standard multivariate inference in the context of envelope models; for example, prediction and prediction errors, F test for two nested models, the standard errors for contrasts or linear combinations of coefficients, and more. Examples and datasets are contained in the toolbox to illustrate the use of each model. All functions and datasets are documented.


Introduction
The envelope model is a new construction originally introduced by Cook, Li, and Chiaromonte (2010) in the context of multivariate linear regression where Y ∈ R r is the multivariate response vector, X ∈ R p is the non-stochastic predictor vector centered at 0 in the sample, the error vectors ε ∈ R r are identically and independently distributed across observations with mean 0 and positive definite covariance matrix Σ ∈ R r×r , and α ∈ R r is the unknown intercept.The key parameters are the elements of the coefficient matrix β ∈ R r×p .Compared to the standard ordinary least squares estimator β ols , the envelope estimator β em is potentially less variable and thus more efficient.This is achieved by allowing for the possibility that the distribution of some linear combinations of Y is invariant to changes in X, and we call this the immaterial part of Y.The immaterial part of Y provides no worthwhile information on β, and yet it increases the variation in β ols .The envelope model identifies and accounts for the immaterial information and therefore reduces the variation in estimation.This reduction can be substantial, especially when the immaterial part of Y introduces large variation.
Several extensions have been developed following Cook et al. (2010).The partial envelope model (Su and Cook 2011) focuses on the estimation of the coefficients for a selected subset of the predictors, and is therefore more efficient in estimating those coefficients.The inner envelope model (Su and Cook 2012) applies the enveloping idea in a novel way, which results in new methodology that is able to gain efficiency even when there is no immaterial information in the data.The heteroscedastic envelope model (Su and Cook 2013) removes the constant variance assumption in the envelope model, making it more flexible and more widely applicable.The scaled envelope model (Cook and Su 2013) is a scale invariant version of the envelope model, which can offer efficiency gains beyond those from the envelope model itself.The envelope model in the predictor space (Cook, Helland, and Su 2013) focuses on dimension reduction for the predictors.It is equivalent to the partial least squares (PLS) in the population and yet performs better than PLS with finite samples.The envelope model that estimates a multivariate mean can be viewed as an alternative to Stein estimation.Like the other methods it is particularly effective and can perform better than Stein estimation when there is immaterial information present in the data.
The only software that now performs envelope estimation is MATLAB (The MathWorks, Inc. 2012b) package LDR (Cook, Forzani, and Tomassi 2009).This package is mainly focused on likelihood-based sufficient dimension reduction, not envelope estimation.It implements the basic envelope model in Cook et al. (2010), but not any of its extension or any inference methods in the envelope model context.This article describes the toolbox envlp, which implements all the existing envelope methods.It also contains functions for dimension selection, bootstrap estimation, prediction and hypothesis testing.Examples are provided to illustrate the use of the toolbox.All the documentation, as well as updates can be checked at the website http://code.google.com/p/envlp/.
The rest of this paper is organized as follows.The envelope models are discussed in Section 2. Section 3 is an overview of the toolbox.Section 4 provides some examples on using the package.Discussion on future developments is in Section 5.
conditions are equivalent to the following two conditions where P (•) is a projection matrix onto the subspace indicated by its argument and Q (•) = I − P (•) .If we have (2b), span(Γ) is called a reducing subspace of Σ (Conway 1990).An envelope subspace is defined as the smallest reducing subspace of Σ containing B (Cook et al. 2010), and is denoted by E Σ (B).In the context of (1), let Γ ∈ R r×u span the envelope subspace E Σ (B).The envelope model is then written as follows r−u) are unknown positive definite matrices, u is the dimension of the envelope subspace.From this model, the two conditions in (2) are satisfied: B is contained in span(Γ), and Σ is the sum of Σ 1 = VAR(P Γ Y), the variance related to the material part of Y, and Σ 2 = VAR(Q Γ Y), the variance related to the immaterial part.It is seen from the envelope model that β and Σ are linked by Γ and it is this link that results in more efficient estimation of β.In effect, the estimation process accounts for the variation in the immaterial information Γ 0 Y.Let • denote the spectral norm of a matrix.When Σ 1 Σ 2 , the immaterial part has relatively large variation and the envelope model will offer substantial efficiency gains over the standard model (1).
When u = r, there is no immaterial information in Y, and the envelope model is equivalent to the standard model ( 1).This will happen when the rank of β is equal to r.

Partial envelope model
The partial envelope model (Su and Cook 2011) is appropriate when part of the predictors are of special interest.It is often more efficient than the envelope model for the purpose of estimating the regression coefficients for those predictors.
Suppose we can partition X to (X 1 , X 2 ) , where X 1 ∈ R p 1 are the predictors of special interest and X 2 ∈ R p 2 are covariates, p 1 + p 2 = p.Then β can be partitioned accordingly into (β 1 , β 2 ), and (1) can be written as The partial envelope model applies the enveloping idea on The coordinate form of the partial envelope model is Intuitively, more information is immaterial relative to β 1 , so the partial envelope model is typically more efficient than the envelope model for the purpose of estimating β 1 .
The partial envelope model degenerates to the standard model when u 1 = r, which means no information is immaterial to β 1 .This happens when the rank of β 1 is equal to r.So in a regression problem where rank(β) = r, the envelope model degenerates to the standard model; while as long as p 1 < r, the partial envelope model is still applicable.In this sense, the partial envelope model is more flexible than the envelope model.

Heteroscedastic envelope model
The envelope model in Section 2.1 assumes homogeneity of the error variance.The heteroscedastic envelope model (Su and Cook 2013) removes this assumption and allows for non-constant covariance structure.The heteroscedastic envelope model was developed in the context of estimating multivariate means for different populations.This problem can be formulated as where the subscripts with parentheses denote groups and subscripts without parentheses denote observations within a group, Y (i)j ∈ R r is the jth observation in the ith group, µ ∈ R r is the grand mean over all the observations, β (i) ∈ R r is the main effect of the ith group and we assume that p i=1 n (i) β (i) = 0, n (i) is the sample size for the ith group, ε (i)j ∈ R r follows a distribution with mean 0 and covariance matrix Σ (i) ∈ R r×r .From this formulation, the errors have heteroscedastic covariance structure.
The heteroscedastic envelope model applies the enveloping idea on all the β (i) 's, and at the same time accommodates the heteroscedastic covariance structure.Let M = {Σ (i) : i = 1, • • • , p} be the collection of covariance matrices and let B = span(β (1) , • • • , β (p) ).The Menvelope of B, denoted by E M (B), is the intersection of all subspaces that contain B and reduce each member of M. The coordinate form of this model is are both positive definite matrices, and u is the dimension of E M (B).When u = r, the heteroscedastic envelope model degenerates to the standard model (3).
Compared with the envelope model in Section 2.1, recognizing the heteroscedastic error structure leads to more reliable estimators and greater efficiency gains.To test homogeneity of the covariance matrices, Box's M test (Johnson and Wichern 2007) can be used.

Inner envelope model
The inner envelope model (Su and Cook 2012) provides an envelope method that can achieve efficiency gains even when all of Y is material.It has a different mechanism in utilizing the tool of reducing subspaces.Under the standard model (1), an inner Σ-envelope of B, denoted by IE Σ (B), is the reducing subspace of Σ with maximal dimension that is contained in B. Let Γ 1 ∈ R r×u be an orthogonal basis that spans IE Σ (B).The coordinate form of the inner envelope model is then The inner envelope model divides β into two parts by IE Σ (B).If the part Γ 1 η 1 is estimated with greater precision than the standard model (particularly when Σ 1 Σ 2 ), and the part Γ 0 Bη 2 is estimated with about the same precision, then overall we get better efficiency in estimating β.The possible values of u are from 0 to p.When u = 0, the inner envelope model reduces to the standard model and when u = p, the inner envelope model is equivalent to the envelope model in Section 2.1.

Scaled envelope model
The scaled envelope model (Cook and Su 2013) is a scale invariant version of the envelope model in Section 2.1.It is invariant under scale transformation of the responses and can achieve efficiency gains beyond those offered by the envelope model.It is an alternative choice to the envelope model especially when u = r is inferred via the envelope model.
Let Λ ∈ R r×r be a diagonal matrix to represent the scale transformation of the responses.Its diagonal elements are λ i > 0, i = 1, • • • , r, with λ 1 = 1 and the rest to be estimated.Under the framework of (1), the coordinate form of a scaled envelope model is u) are positive definite matrices, and u is the dimension of the Λ −1 ΣΛ −1 -envelope of Λ −1 B. The scaled envelope model reduces to the standard model ( 1) when u = r.Like the other envelope methods, the goal of the scaled envelope is to improve estimation efficiency in the estimation of β = ΛΓη.When u < r, the scaled envelope model is not nested within the standard model or any scaled envelope model with a large dimension, so likelihood ratio testing cannot be applied for selection of u.

Envelope model in the predictor space
The envelope model in the predictor space (Cook et al. 2013) is based on the possibility that the distribution of the full response vector Y is invariant to changes in some linear combinations of the predictors X.It can be applied under the context of (1) with the response being univariate or multivariate.In terms of prediction, the performance of this estimator is asymptotically as good as or better than the least squares estimator.In population, it is equivalent to the partial least squares estimator obtained from the SIMPLS algorithm (de Jong 1993), but it typically has better performance with finite samples.
In contrast to the previous envelope models, we now assume that the predictors are random so (Y, X) has a joint distribution.Let Σ X = VAR(X) and let B * = span(β ).Then the Σ Xenvelope of B * , denoted by E Σ X (B * ), is the smallest reducing subspace of Σ X that contains B * .Letting Γ ∈ R p×u be an orthogonal basis of E Σ X (B * ), the coordinate form of the envelope model in the predictor space is where u) , and u is the dimension of the envelope E Σ X (B * ).When u = p, this envelope model reduces to the standard model (1).
Under model ( 4), let E denote E Σ X (B * ) for subscripts, then Y is conditionally uncorrelated with Q E X given P E X, and Q E X is uncorrelated with P E X. Then Q E X is immaterial to the regression.By recognizing and accounting for the immaterial part, the envelope model (4) has a better prediction performance than the standard model or even the partial least squares estimator.

Envelope model with small sample size
When the sample size is smaller than r in the envelope model (Section 2.1) or p in the envelope model in the predictor space (Section 2.6), the usual envelope estimators cannot be computed.In these cases, a sequential algorithm (Cook 2012) can be used to obtain estimators that are (i) equivalent to the usual envelope estimators in the population, (ii) not generally as efficient when n > r or n > p, but (iii) can still provide useful results in small samples.
The usual estimators of an envelope subspace are obtained by optimizing an objective function over a Grassmann manifold.For example, to estimate E Σ (B) (cf.Section 2.1), we minimize the following objective function over a Grassmann manifold G(r, u): where Σ Y ∈ R r×r is the sample covariance matrix of Y, Σ res ∈ R r×r is the sample covariance matrix of the residuals from the least squares regression of Y given X, and | • | is the determinant.The matrix Σ Y is singular when the sample size is smaller than r and consequently the objective fuction is not well-defined.However, a sequential algorithm can be used to obtain an alternative estimator of Γ.This estimator then allows straightforward computation of the other parameters in the envelope model, including β.
Let u ∈ R a×b have rank(u) ≤ b, let S = span(u) ⊆ span(M), where M ∈ R a×a is a semi positive-definite matrix.Suppose that the M-envelope of S, E M (S), has dimension d.Set w 0 = 0, W = w 0 , and where l 1 (A) means the eigenvector corresponding to the largest eigenvalue of A. At termination, E M (S) = span(W d ).The sample version of this algorithm is obtained by simply substituting sample versions of U and M.
This sequential algorithm can be used for estimating a general envelope subspace.In this toolbox, it is implemented for the envelope model and the envelope model in the predictor space.With envelope model in the predictor space, Cook et al. (2013) showed that in the population the envelope subspace provided by this algorithm is the same as that provided by the SIMPLS algorithm.
The sequential algorithm described above can also be used for large sample size cases, and it is much faster than performing the Grassmann manifold optimization.It also provides a √ n consistent estimator of the envelope subspace, although with large sample size, this estimator's performance may not be as good as that of the estimator based on Grassmann optimization.

Envelope estimator for multivariate mean
The context for the envelope methodology in this section is a bit different from that in previous sections, as now we consider estimating the multivariate mean, not fitting multivariate linear regression.Assuming that the sample Y 1 , • • • , Y n is independent and identically distributed with mean µ and covariance matrix Σ ∈ R p×p , the sample mean Ȳ = n i=1 Y i is a natural estimator of µ. James and Stein proved that this estimator is not admissible and is dominated by the James-Stein estimator for p ≥ 3. Preliminary investigations have indicated that the envelope estimator for multivariate mean has a smaller mean square error than Ȳ, and it often has a smaller mean square error than the James-Stein estimator.
The envelope estimator for the multivariate mean is based on the assumption that µ is orthogonal to some eigenvectors of Σ. Diaconis and Freedman (1984) showed that as the dimension tends to infinity, two random vectors are orthogonal to each other with probability 1.In the envelope model for estimating the multivariate mean, it is assumed that µ lies within the space spanned by a subset of the eigenvectors of Σ, and we call the space S. By a result in Cook et al. (2010), S is the Σ-envelope of M, where M = span(µ).
Let Γ ∈ R p×u be a semi-orthogonal matrix that spans E Σ (M), then the envelope model is u) carry the coordinates.The envelope estimator has the form μem = P Γ Ȳ.The difference between the James-Stein estimator and the envelope estimator can be visualized in Figure 1.In the figure, the ellipse represents the distribution of Ȳ.The James-Stein estimator of µ is denoted as μJS , and it shrinks Ȳ towards the origin.In contrast to μJS , the envelope estimator μem is the projection of Ȳ onto the estimated envelope ÊΣ (M).In this figure, E Σ (M) aligns with the eigenvector corresponding to the smaller eigenvalue of Σ.Then the envelope estimator μem is much less variant than Ȳ, and it is expected to have a smaller mean squared error than Ȳ, or even μJS .

Role of normality
None of the envelope models discussed in Sections 2.1-2.8require constraints on the distribution of the errors ε beyond those listed previously.Adding the assumption that the errors are normally distributed facilitates an analysis by providing a well-defined likelihood and asymptotic standard errors.Excluding the sequential methods, all fitting in the envlp toolbox is based on normal likelihoods, along with their corresponding inference methods.Those likelihoods also provide √ n-consistent estimators without normality and experience has shown that they perform well in non-normal settings.However, inference methods may be impacted by clear deviations from normality and then it is recommended that the bootstrap methods available in the envlp toolbox be used for standard errors and inference.The bootstrap is the only method provided for computing standard errors for the sequential estimators, as listed in Table 1.In this toolbox, the core function always has the same name as the module.The dimension selection functions and inference tools available are different from module to module, as the nature of the models is different.All modules will be described in details later in this section.The structure of this toolbox is summarized in Table 1.

Toolbox overview
This toolbox relies on MATLAB toolbox sg min 2.4.3 (Lippert 2004)  toolboxes mentioned before.Once the toolbox is installed, you can call functions or datasets in the toolbox from any current working directory.
The toolbox contains three types of functions: the core functions, functions for dimension selection and functions for inference tools.Section 3.1 to 3.3 are devoted to the description of these three types.

Core functions
The functions that fit the envelope models are the core functions of this package.There are nine of them, one in each module, and they share the same names as the module names.For example, the function env fits the envelope model, and the function envmean finds the envelope estimator for the multivariate mean.The envelope models in the regression context are env, henv, ienv, penv, senv, xenv, envseq and xenvpls.The inputs for these models are X, Y and u, where X and Y store the data matrices for the predictors and the responses, and u is the dimension of the envelope, which can be obtained by the functions discussed in Section 3.2.The inputs for envmean are the data matrix Y and the dimension of the envelope u, as this context does not involve any predictors.The output of these nine functions is a list containing the envelope estimators of model parameters, and important statistics calculated from the models like the value of the maximized log-likelihood function, asymptotic covariance matrix of the estimators, number of parameters in the model and many others.
We present an example by applying the envelope model to the wheat protein data in Cook et al. (2010).The wheat protein data contains seven variables, the logarithms of near infrared reflectance measured at six wavelengths and a group indictor taking value 0 or 1 for wheat with low or high protein content.In multivariate linear regression (1), we take the group indicator as the predictor and the spectral measurements as responses.The regression coefficients are then the mean differences between the two groups.For demonstration purpose, we take only the third and fourth measurements as responses, so that we can visualize the data.First we load the data and assign the predictor and responses.load wheatprotein.txtX = wheatprotein(:, 8); Y = wheatprotein(:, 3 : 4); The standard errors are large relative to the absolute value of elements in β, so it is hard to tell the difference between the two groups.The two curves in the left panel of Figure 2 present the projection distribution of the two groups onto the Y 1 axis, with the solid line for the high protein group and the dashed line for the low protein group.The projection path for a sample point 'x' is marked as A in the plot.We notice that the two curves almost overlap with each other, so it is hard to distinguish between the two groups.This is consistent with the comparison of the absolute values of elements in β and their associated standard errors.
To fit the envelope model to this data, we need the dimension of the envelope.Dimension selection will be discussed in Section 3.2, for now we just fixed the dimension of the envelope at 1.After fitting the envelope model, the output is a list containing the estimates of regression coefficients β, error covariance matrix Σ, parameters in the envelope model including Γ, η, Ω, and Ω 0 , as well as important statistics like the value of the maximized log-likelihood l, the asymptotic covariance matrix of vectorized β, the asymptotic standard error for each element in β, the number of parameters in the model and the sample size.To get the estimated group difference, we call the respective component in the list ModelOutput.beta.Similar to the standard model, we can get the standard errors for elements in β by dividing their asymptotic standard errors by √ n.The envelope estimators of the two elements in β are 5.14 and −4.68, with standard errors 0.51 and 0.47.Compared to the size of the elements in β, the standard errors are small and it is easy to tell the difference between the two groups.The right panel of Figure 2 illustrates the envelope analysis: The envelope model identifies the variation in the direction of E ⊥ Σ (B) as carrying no information on β, so a sample data point 'x' is projected first onto the envelope subspace E Σ (B), and then onto the Y 1 axis.The projection route is marked as B. The uniqueness of the envelope model is reflected on the first segment of B, which accounts for the immaterial information in the data.The two curves on the Y 1 axis are projection distributions of the two groups, with each data point following route similar to B. The two curves are well separated, indicating that we have obtained substantial efficiency gains.To quantify the gains, we can compare the standard errors of the standard estimator and the envelope estimator by taking their ratios.In this example, the ratios are 16.80 and 20.25 for the two elements in β.

Dimension selection
Likelihood based methods including Akaike information criteria (AIC), Bayesian information criteria (BIC) and likelihood ratio testing (LRT) are implemented for selecting the dimension of an envelope.In small sample size cases where the likelihood is not well-determined, we select the dimension by m-fold cross validation.
The functions modelselectaic, modelselectbic and modelselectlrt choose the dimension for the envelope models in the regression context by AIC, BIC and LRT.The common inputs for these three functions are data matrix X, Y, and modelType, while LRT has an additional input alpha indicating the significance level.The choices for modelType are 'env', 'henv', 'ienv', 'penv', 'senv' and 'xenv'.The function mfoldcv chooses the dimension of the envelope models by m-fold cross validation.It divides the data into m folds of about equal size, and then uses one fold in turn as testing samples and the rest as training samples.The function returns the dimension that minimizes the average squared prediction errors using the identity inner product.The inputs for mfoldcv are data matrices X, Y, number of folds m and modelType.This method can be applied to any model, so the choices for modelType are 'env ', 'envseq', 'henv', 'ienv', 'penv', 'senv', 'xenv', 'xenvpls' and 'envmean'.We write separate dimension selection functions for envelope estimator of multivariate means, as they have different input variables.The input variable of aic_envmean, bic_envmean and lrt_envmean is the data matrix Y only.The output for all the dimension selection functions is an integer u for the dimension of the envelope subspace.
Back to the wheat protein data example discussed in Section 3.1, we applied AIC, BIC and LRT with significance level 0.01 to select the dimension.We notice that all three criteria agree that the dimension of the envelope subspace is 1.According to the right panel in Figure 2, u = 1 is well agreed by the data, and the estimated envelope subspace E Σ (B) is marked in the plot.

Inference tools
The inference tools provided by toolbox envlp include bootstrap estimation of standard errors, estimation and prediction at a new observation, and hypothesis testing.
The function bootstrapse computes the standard errors for elements in the estimated regression coefficients by bootstrapping the residuals.Its inputs are data matrices X, Y, the dimension of the envelope u, number of bootstrap sample B, and modelType, which can be env, envseq, henv, ienv, penv, senv, xenv or xenvpls.The output bootse is a matrix having the same dimension as β with each element being the standard error of the corresponding element in β.The function btrsp_envmean computes the standard errors for elements in μem .Its inputs and output are similar to bootstrapse, except that it does not need X and modelType for input.The function predict performs estimation or prediction for envelope models in the regression context.It returns a list PredictOutput which includes the estimated or predicted value, its standard errors and covariance matrix.The input ModelOutput is the output list from the core functions, Xnew is a column vector containing the value of X at which to estimate or predict Y, infType can be chosen from 'estimation' or 'prediction', and modelType can be env, henv, ienv, penv, senv or xenv.In the context of estimating a multivariate mean, the prediction function is called predict_envmean.It has similar structure as predict except that it does not have inputs Xnew and modelType.
The function testcoefficient tests if certain linear combination of the rows or columns of the regression coefficients are equal to some pre-specified values.More specifically, letting L, R and A be a × r, p × b and a × b matrices of constants, testcoefficient tests H 0 : LβR = A versus H a : LβR = A. The inputs are ModelOutput which is the output from the core functions, TestInput which is a list that specifies L, R and A in the hypotheses and modelType which can be chosen from env, henv, ienv, penv, senv and xenv.The output TestOutput is a list that contains test statistic, degrees of freedom, p value and the covariance matrix of vectorized L βR.At the same time, a table is printed out to display the test results.The function testcoefficient_envmean is for testing H 0 : Lµ = A versus H a : Lµ = A, where µ is the multivariate mean, L is an a × r matrix and A is an a × 1 vector.The output of testcoefficient_envmean has the same form as testcoefficient, but its input does not include modelType.
Continuing with the wheat protein example, the standard error of each element in β can also be estimated by residual bootstrap, which be obtained by the command bootstrapse.The inputs for bootstrapse are the predictors X, the responses Y, the dimension of the envelope model u, the number of bootstrap samples B, and a string that represents the model modelType.We took u = 1 as discussed in Section 3.2, and we put 'env' for modelType.Recall that the standard errors calculated using asymptotic standard errors are 0.5142 and 0.4685, which are quite close to the bootstrap standard errors.We do not set seeds for the function bootstrapse, so the user can get different results each time he runs the function.But when B is large, the results should be close to each other.Now to test if β = 0, we use the function testcoefficient.If we do not input L, R and A and leave the input TestInput as blank, then by default it is testing if β = 0.
The output shows a highly significant p value, which is strong evidence that the two wheat groups are different.

Monitoring and controlling the convergence speed
The running time for most examples in the package is in the order of seconds, some are in the order of minutes.It can take longer for larger data sets.Envelope estimation relies on Grassmann manifold optimization, which uses an iterative algorithm.The running time of the functions depends on the nature of the methods, tolerance levels for convergence and the starting value.For example, using AIC or BIC for dimension selection takes longer than using LRT because of different stopping criteria; senv runs longer than env because of its method of estimation; setting the tolerance level at 10 −7 can reduce running time than setting the tolerance level at 10 −9 .For this purpose, we add an optional argument Opts to each function so that the user can monitor the iteration process and adjust the tolerance level.Opts is a list, and it provides the user the option to display the current number of iteration, specify a starting value, control the maximum number of iteration and set the tolerance levels.If the user does not define any of the components, default values will be used.For more details, please refer to the user's guide.

Example
In this section, we provide one more example which uses the module henv.We hope the users can get an idea of the similarity and difference in the usage of different modules.The water strider data was analyzed by Su and Cook (2013).It has 30 measurements of eight characteristics for each of the three species of water striders: L. esakii, L. dissortis and L. As we are in the context of comparing multivariate mean for different populations, the output list for the heteroscedastic envelope model contains the estimates of the grand mean µ, the group means µ (i) , and the error covariance matrices for each group Σ (i) .The output list also has the constituent parameters and important statistics just as in the output list of env.The first column gives the predicted value, which is the estimated group mean, and the prediction errors are in the second column.
The usage of other modules is similar, it is just the inputs and outputs of the functions are tailored for different models.For details on the syntax and semantics of the functions, the user can refer to the Reference Manual.

Conclusion
The MATLAB toolbox envlp implements a variety of envelope models in the context of multivariate linear regression and estimating multivariate means.Complete documentation is provided for each function and a user's guide to the toolbox is also available.Description for all datasets is also included.Scripts are provided to reproduce all published results of these methods.The package is modularized and it is easy for the user to follow the structure of the package if they want to add new methods to the toolbox.Our aim for the future is to extent the package and add more methods to the toolbox as well as providing more inference tools.
Updates can be checked on the toolbox website.

Figure 2 Figure 2 :
Figure2displays the data with two axis assigned to the two responses.For better visualization, we centered the data to have mean 0. Under the standard model, the estimated coefficients in β are 7.52 and −2.06, with the associated standard errors for these two elements being 8.64 and 9.49.The standard errors returned by Out.asySE are asymptotic, for actual standard errors, we need to multiply by 1/ √ n, where n is the sample size.

Table 1 :
(Strang 2000)2009)fold optimization.sgmin2.4.3 uses the analytical first derivative and numerical second derivative of the objective function to perform the optimization, and we find it is stable.Some modifications are made to it for the envelope model context.A few auxiliary functions in the toolbox envlp rely on MATLAB Statistics toolbox (The MathWorks, Inc. 2012a), LDR toolbox(Cook et al. 2009), Tcodes toolbox(Strang 2000)and function MBoxtest (Trujillo-Ortiz and Hernandez-Walls 2002).Structure of toolbox envlp.
To install the toolbox, direct the MATLAB working directory to the folder "envlp", and type the command install_envlp.If a previous version is present, simply replace the folder by that of the latest version and type install_envlp.The installation will be completed if you agree with the license agreement.You do not need to load the auxiliary functions or To get the estimated group mean, we call ModelOutput.mug.If there are p groups, ModelOutput.mugwill have p columns, each for one group.We can find the corresponding group indicators by calling The ith row in ModelOutput.groupIndcorresponds to the ith column in ModelOutput.mug.For example, the estimated mean vector of the eight characteristics for L. rufoscutellatus is in the first column of ModelOutput.mug.To predict a new observation, we input its group indicator.Suppose we want to predict a new observation of L. dissortis.