This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Log-likelihood function for least-squares regression with missing data


Objective = ecmlsrobj(Data,Design,Parameters,Covariance)



NUMSAMPLES-by-NUMSERIES matrix with NUMSAMPLES samples of a NUMSERIES-dimensional random vector. Missing values are represented as NaNs. Only samples that are entirely NaNs are ignored. (To ignore samples with at least one NaN, use mvnrmle.)


A matrix or a cell array that handles two model structures:

  • If NUMSERIES = 1, Design is a NUMSAMPLES-by-NUMPARAMS matrix with known values. This structure is the standard form for regression on a single series.

  • If NUMSERIES1, Design is a cell array. The cell array contains either one or NUMSAMPLES cells. Each cell contains a NUMSERIES-by-NUMPARAMS matrix of known values.

    If Design has a single cell, it is assumed to have the same Design matrix for each sample. If Design has more than one cell, each cell contains a Design matrix for each sample.


NUMPARAMS-by-1 column vector of estimates for the parameters of the regression model.


(Optional) NUMSERIES-by-NUMSERIES matrix that contains a user-supplied estimate for the covariance matrix of the residuals of the regression. Default is an identity matrix.


Objective = ecmlsrobj(Data,Design,Parameters,Covariance) computes a least-squares objective function based on current parameter estimates with missing data. Objective is a scalar that contains the least-squares objective function.


ecmlsrobj requires that Covariance be positive-definite.

Note that

ecmlsrobj(Data, Design, Parameters) = ecmmvnrobj(Data, ... 
Design, Parameters, IdentityMatrix)

where IdentityMatrix is a NUMSERIES-by-NUMSERIES identity matrix.

You can configure Design as a matrix if NUMSERIES = 1 or as a cell array if NUMSERIES1.

  • 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 NUMSERIES-by-NUMPARAMS matrix.


See Multivariate Normal Regression, Least-Squares Regression, Covariance-Weighted Least Squares, Feasible Generalized Least Squares, and Seemingly Unrelated Regression.

Introduced in R2006a