ecmnobj
Multivariate normal negative log-likelihood function
Description
adds an optional argument for Objective
= ecmnobj(___,CholCovariance
)CholCovariance
.
Examples
Compute Value of the Observed Negative Log-Likelihood Function for Data
This example shows how to compute the value of the observed negative log-likelihood function for five years of daily total return data for 12 computer technology stocks, with six hardware and six software companies
load ecmtechdemo.mat
The time period for this data extends from April 19, 2000 to April 18, 2005. The sixth stock in Assets is Google (GOOG), which started trading on August 19, 2004. So, all returns before August 20, 2004 are missing and represented as NaN
s. Also, Amazon (AMZN) had a few days with missing values scattered throughout the past five years.
[ECMMean, ECMCovar] = ecmnmle(Data)
ECMMean = 12×1
0.0008
0.0008
-0.0005
0.0002
0.0011
0.0038
-0.0003
-0.0000
-0.0003
-0.0000
⋮
ECMCovar = 12×12
0.0012 0.0005 0.0006 0.0005 0.0005 0.0003 0.0005 0.0003 0.0006 0.0003 0.0005 0.0006
0.0005 0.0024 0.0007 0.0006 0.0010 0.0004 0.0005 0.0003 0.0006 0.0004 0.0006 0.0012
0.0006 0.0007 0.0013 0.0007 0.0007 0.0003 0.0006 0.0004 0.0008 0.0005 0.0008 0.0008
0.0005 0.0006 0.0007 0.0009 0.0006 0.0002 0.0005 0.0003 0.0007 0.0004 0.0005 0.0007
0.0005 0.0010 0.0007 0.0006 0.0016 0.0006 0.0005 0.0003 0.0006 0.0004 0.0007 0.0011
0.0003 0.0004 0.0003 0.0002 0.0006 0.0022 0.0001 0.0002 0.0002 0.0001 0.0003 0.0016
0.0005 0.0005 0.0006 0.0005 0.0005 0.0001 0.0009 0.0003 0.0005 0.0004 0.0005 0.0006
0.0003 0.0003 0.0004 0.0003 0.0003 0.0002 0.0003 0.0005 0.0004 0.0003 0.0004 0.0004
0.0006 0.0006 0.0008 0.0007 0.0006 0.0002 0.0005 0.0004 0.0011 0.0005 0.0007 0.0007
0.0003 0.0004 0.0005 0.0004 0.0004 0.0001 0.0004 0.0003 0.0005 0.0006 0.0004 0.0005
⋮
To evaluate the negative log-likelihood function for ecmnmle
, use ecmnobj
based on the current maximum likelihood parameter estimates.
Objective = ecmnobj(Data,ECMMean,ECMCovar)
Objective = -3.0898e+04
Input Arguments
Data
— Data
matrix
Data, specified as an
NUMSAMPLES
-by-NUMSERIES
matrix
with NUMSAMPLES
samples of a
NUMSERIES
-dimensional random vector. Missing values are
indicated by NaN
s.
Data Types: double
Mean
— Maximum likelihood parameter estimates for mean of Data
vector
Maximum likelihood parameter estimates for the mean of the
Data
using the ECM algorithm, specified as a
NUMSERIES
-by-1
column vector.
Covariance
— Maximum likelihood parameter estimates for covariance of Data
matrix
Maximum likelihood parameter estimates for the covariance of the
Data
using the ECM algorithm, specified as a
NUMSERIES
-by-NUMSERIES
matrix.
CholCovariance
— Cholesky decomposition of covariance matrix
[ ]
(default) | matrix
(Optional) Cholesky decomposition of covariance matrix, specified as a
matrix using chol
as:
chol(Covariance)
Data Types: double
Output Arguments
Objective
— Value of the observed negative log-likelihood function over Data
numeric
Value of the observed negative log-likelihood function over the
Data
, returned as a numeric value.
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)