Documentation Center 
Multivariate normal regression (ignore missing data)
[Parameters, Covariance, Resid, Info] = mvnrmle(Data, Design,
MaxIterations, TolParam, TolObj, Covar0, CovarFormat)
Data  NUMSAMPLESbyNUMSERIES matrix with NUMSAMPLES samples of a NUMSERIESdimensional random vector. If a data sample has missing values, represented as NaNs, the sample is ignored. (Use ecmmvnrmle to handle missing data.) 
Design  Matrix or a cell array that handles two model structures:

MaxIterations  (Optional) Maximum number of iterations for the estimation algorithm. Default value is 100. 
TolParam  (Optional) Convergence tolerance for estimation algorithm based on changes in model parameter estimates. Default value is sqrt(eps) which is about 1.0e8 for double precision. The convergence test for changes in model parameters is 
 
where Param represents the output Parameters, and iteration k = 2, 3, ... . Convergence is assumed when both the TolParam and TolObj conditions are satisfied. If both TolParam ≤ 0 and TolObj ≤ 0, do the maximum number of iterations (MaxIterations), whatever the results of the convergence tests.  
TolObj  (Optional) Convergence tolerance for estimation algorithm based on changes in the objective function. Default value is eps ∧ 3/4 which is about 1.0e12 for double precision. The convergence test for changes in the objective function is
for iteration k = 2, 3, ... . Convergence is assumed when both the TolParam and TolObj conditions are satisfied. If both TolParam ≤ 0 and TolObj ≤ 0, do the maximum number of iterations (MaxIterations), whatever the results of the convergence tests. 
Covar0  (Optional) NUMSERIESbyNUMSERIES matrix that contains a usersupplied initial or known estimate for the covariance matrix of the regression residuals. 
CovarFormat  (Optional) String that specifies the format for the covariance matrix. The choices are:

[Parameters, Covariance, Resid, Info] = mvnrmle(Data, Design, MaxIterations, TolParam, TolObj, Covar0, CovarFormat) estimates a multivariate normal regression model without missing data. The model has the form
for samples k = 1, ... , NUMSAMPLES.
mvnrmle estimates a NUMPARAMSby1 column vector of model parameters called Parameters, and a NUMSERIESbyNUMSERIES matrix of covariance parameters called Covariance.
mvnrmle(Data, Design) with no output arguments plots the loglikelihood function for each iteration of the algorithm.
To summarize the outputs of mvnrmle:
Parameters is a NUMPARAMSby1 column vector of estimates for the parameters of the regression model.
Covariance is a NUMSERIESbyNUMSERIES matrix of estimates for the covariance of the regression model's residuals.
Resid is a NUMSAMPLESbyNUMSERIES matrix of residuals from the regression. For any row with missing values in Data, the corresponding row of residuals is represented as all NaN missing values, since this routine ignores rows with NaN values.
Another output, Info, is a structure that contains additional information from the regression. The structure has these fields:
Info.Obj – A variableextent column vector, with no more than MaxIterations elements, that contains each value of the objective function at each iteration of the estimation algorithm. The last value in this vector, Obj(end), is the terminal estimate of the objective function. If you do maximum likelihood estimation, the objective function is the loglikelihood function.
Info.PrevParameters – NUMPARAMSby1 column vector of estimates for the model parameters from the iteration just before the terminal iteration.
Info.PrevCovariance – NUMSERIESbyNUMSERIES matrix of estimates for the covariance parameters from the iteration just before the terminal iteration.
mvnrmle does not accept an initial parameter vector, because the parameters are estimated directly from the first iteration onward.
You can configure Design as a matrix if NUMSERIES = 1 or as a cell array if NUMSERIES ≥ 1.
If Design is a cell array and NUMSERIES = 1, each cell contains a NUMPARAMS row vector.
If Design is a cell array and NUMSERIES > 1, each cell contains a NUMSERIESbyNUMPARAMS matrix.
These points concern how Design handles missing data:
Although Design should not have NaN values, ignored samples due to NaN values in Data are also ignored in the corresponding Design array.
If Design is a 1by1 cell array, which has a single Design matrix for each sample, no NaN values are permitted in the array. A model with this structure must have NUMSERIES ≥ NUMPARAMS with rank(Design{1}) = NUMPARAMS.
Two functions for handling missing data, ecmmvnrmle and ecmlsrmle, are stricter about the presence of NaN values in Design.
Use the estimates in the optional output structure Info for diagnostic purposes.
See Multivariate Normal Regression, LeastSquares Regression, CovarianceWeighted Least Squares, Feasible Generalized Least Squares, and Seemingly Unrelated Regression.
Roderick J. A. Little and Donald B. Rubin, Statistical Analysis with Missing Data, 2nd ed., John Wiley & Sons, Inc., 2002.
XiaoLi Meng and Donald B. Rubin, "Maximum Likelihood Estimation via the ECM Algorithm," Biometrika, Vol. 80, No. 2, 1993, pp. 267278.
ecmmvnrmle  mvnrobj  mvnrstd