\name{esgpls} \alias{esgpls} \title{Fit the envelope based sparse generalised partial least squares model} \description{ This function fits the envelope based sparse generalized partial least squares using the maximum likelihood estimation. When the dimension of the envelope is between 1 and p-1, we implemented the algorithm in G. Zhu and Z. Su (2017). When the dimension is p, then the envelope model degenerates to the standard generalised linear model. } \usage{ ModelOutput = esgpls(X, Y, u,family='logistic') ModelOutput = esgpls(X, Y, u,family='poisson') } \arguments{ \item{X}{Predictors. An n by p matrix, p is the number of predictors. The predictors can be univariate or multivariate, discrete or continuous.} \item{Y}{Multivariate responses. An n by r matrix, r is the number of responses and n is number of observations. The responses must be continuous variables.} \item{u}{Dimension of the envelope. An integer between 0 and p.} \item{family}{A description of the error distribution. 'logistic' for logistic regression, 'poisson' for Poisson regression.} \item{lambda1}{A user supplied lambda sequence for first stage.} \item{lambda2}{A user supplied lambda sequence for second stage.} \item{eps}{Convergence tolerance. Default value: 1e-4. } \item{init}{The initial value for the envelope subspace. An p by u matrix. Default value is the one generated by function egpls_ini} \item{asym}{Flag for calculate compute the asyptotic covariance of vec(beta) and asymptotic standard error for elements in beta for a fiteed envelope model, logical 0 or 1. Default value: 0. } \item{verbose}{Flag for print out model fitting process, logical 0 or 1. Default value: 0.} } %\details{} \value{ \item{alpha}{The estimated intercept in the envelope model. A real number.} \item{beta}{The envelope estimator of the regression coefficients. An p by 1 matrix.} \item{eta}{The coordinates of beta with respect to Gamma. A u by 1 matrix.} \item{Gamma}{The orthogonal basis of the envelope subspace. An p by u semi-orthogonal matrix.} \item{Gamma0}{The orthogonal basis of the complement of the envelope subspace. An p by p-u semi-orthogonal matrix.} \item{SigX}{The envelope estimator of the covariance matrix of X. An p by p matrix.} \item{Omega}{The coordinates of Sigma with respect to Gamma. A u by u matrix.} \item{Omega0}{The coordinates of Sigma with respect to Gamma0. An p-u by p-u matrix.} \item{loglik}{The maximized log likelihood function. A real number.} \item{paramNum}{The number of parameters in the envelope model. A positive integer.} \item{n}{The number of observations in the data. A positive integer.} \item{q}{The number of active response variables. A positive integer.} \item{where_1}{The active responses chosen by the sparse envelope model.} \item{where_0}{The inactive responses chosen by the sparse envelope model.} \item{BIC_seq1}{The sequence of BIC in the first stage.} \item{BIC_seq2}{The sequence of BIC in the second stage.} \item{covMatrix}{The asymptotic covariance of beta. An p by p matrix. The covariance matrix returned are asymptotic. For the actual standard errors, multiply by 1/n.} \item{asySE}{The asymptotic standard error for elements in beta under the envelope model. An p by 1 matrix. The standard errors returned are asymptotic, for actual standard errors, multiply by 1/sqrt(n).} \item{ratio}{The asymptotic standard error ratio of the standard multivariate linear regression estimator over the envelope estimator, for each element in beta. An p by 1 matrix.} \item{family}{A description of the error distribution.} \item{fit_time}{The time costs for fitting the envelope model.} } \references{ The codes are implemented based on the algorithm in Guangyu Zhu and Zhihua Su (2017). 'Envelope-based Sparse Partial Least Squares', Manuscript sumbitted for publication. } \author{Guangyu Zhu and Zhihua Su\cr Maintainer: Guangyu Zhu \email{gzhu22@ufl.edu}} \examples{ }