mvnrmle
Multivariate normal regression (ignore missing data)
Syntax
[Parameters,Covariance,Resid,Info] = mvnrmle(Data,Design,MaxIterations,TolParam,TolObj,Covar0,CovarFormat)
Arguments
|
|
| Matrix or a cell array that handles two model structures:
|
| (Optional) Maximum number of iterations for the estimation
algorithm. Default value is |
| (Optional) Convergence tolerance for estimation algorithm
based on changes in model parameter estimates. Default value is |
| |
where | |
| (Optional) Convergence tolerance for estimation algorithm based on changes in the objective function. Default value is eps ∧ 3/4 which is about 1.0e-12 for double precision. The convergence test for changes in the objective function is for iteration k =
2, 3, ... . Convergence is assumed when both the |
| (Optional) |
| (Optional) Character vector that specifies the format for the covariance matrix. The choices are:
|
Description
[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 NUMPARAMS
-by-1
column vector of model parameters called Parameters
, and a
NUMSERIES
-by-NUMSERIES
matrix of covariance
parameters called Covariance
.
mvnrmle(Data, Design)
with no output arguments
plots the log-likelihood function for each iteration of the algorithm.
To summarize the outputs of mvnrmle
:
Parameters
is aNUMPARAMS
-by-1
column vector of estimates for the parameters of the regression model.Covariance
is aNUMSERIES
-by-NUMSERIES
matrix of estimates for the covariance of the regression model's residuals.Resid
is aNUMSAMPLES
-by-NUMSERIES
matrix of residuals from the regression. For any row with missing values inData
, the corresponding row of residuals is represented as allNaN
missing values, since this routine ignores rows withNaN
values.
Another output, Info
, is a structure that
contains additional information from the regression. The structure
has these fields:
Info.Obj
– A variable-extent column vector, with no more thanMaxIterations
elements, that contain 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 log-likelihood function.Info.PrevParameters
–NUMPARAMS
-by-1
column vector of estimates for the model parameters from the iteration just before the terminal iteration.Info.PrevCovariance
–NUMSERIES
-by-NUMSERIES
matrix of estimates for the covariance parameters from the iteration just before the terminal iteration.
Notes
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 andNUMSERIES
=1
, each cell contains aNUMPARAMS
row vector.If
Design
is a cell array andNUMSERIES
>1
, each cell contains aNUMSERIES
-by-NUMPARAMS
matrix.
These points concern how Design
handles missing
data:
Although
Design
should not haveNaN
values, ignored samples due toNaN
values inData
are also ignored in the correspondingDesign
array.If
Design
is a1
-by-1
cell array, which has a singleDesign
matrix for each sample, noNaN
values are permitted in the array. A model with this structure must haveNUMSERIES
≥NUMPARAMS
withrank(Design{1}) = NUMPARAMS
.Two functions for handling missing data,
ecmmvnrmle
andecmlsrmle
, are stricter about the presence ofNaN
values inDesign
.
Use the estimates in the optional output structure Info
for
diagnostic purposes.
Examples
See Multivariate Normal Regression, Least-Squares Regression, Covariance-Weighted Least Squares, Feasible Generalized Least Squares, and Seemingly Unrelated Regression.
References
Roderick J. A. Little and Donald B. Rubin. Statistical Analysis with Missing Data., 2nd Edition. John Wiley & Sons, Inc., 2002.
Xiao-Li Meng and Donald B. Rubin. “Maximum Likelihood Estimation via the ECM Algorithm.” Biometrika. Vol. 80, No. 2, 1993, pp. 267–278.