Main Content

ecmlsrobj

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

Syntax

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

Arguments

Data

NUMSAMPLES-by-NUMSERIESmatrix withNUMSAMPLESsamples of aNUMSERIES-dimensional random vector. Missing values are represented asNaNs. Only samples that are entirelyNaNs are ignored. (To ignore samples with at least oneNaN, usemvnrmle.)

Design

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

  • IfNUMSERIES = 1,Designis aNUMSAMPLES-by-NUMPARAMSmatrix with known values. This structure is the standard form for regression on a single series.

  • IfNUMSERIES1,Designis a cell array. The cell array contains either one orNUMSAMPLEScells. Each cell contains aNUMSERIES-by-NUMPARAMSmatrix of known values.

    IfDesignhas a single cell, it is assumed to have the sameDesignmatrix for each sample. IfDesignhas more than one cell, each cell contains aDesignmatrix for each sample.

Parameters

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

Covariance

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

Description

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

Notes

ecmlsrobjrequires thatCovariancebe positive-definite.

Note that

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

whereIdentityMatrixis aNUMSERIES-by-NUMSERIESidentity matrix.

You can configureDesignas a matrix ifNUMSERIES = 1or as a cell array ifNUMSERIES1.

  • IfDesignis a cell array andNUMSERIES=1, each cell contains aNUMPARAMSrow vector.

  • IfDesignis a cell array andNUMSERIES>1, each cell contains aNUMSERIES-by-NUMPARAMSmatrix.

Examples

SeeMultivariate Normal Regression,Least-Squares Regression,Covariance-Weighted Least Squares,Feasible Generalized Least Squares, and看似不相关的注册ression.

版本历史

Introduced in R2006a