主要内容

Multivariate Normal Regression Types

回归

Each regression function has a specific operation. This section shows how to use these functions to perform specific types of regressions. To illustrate use of the functions for various regressions, “typical” usage is shown with optional arguments kept to a minimum. For a typical regression, you estimate model parameters and residual covariance matrices with themle功能并估计模型参数的标准误差std功能。回归“不丢失数据”基本上忽略了具有任何丢失值的样本,而“缺少数据”的回归忽略了每个值丢失的样本。

Multivariate Normal Regression

多元正常回归或MVNR是财务工具箱™软件中回归函数的“标准”实现。

多元正常回归而没有丢失数据

Estimate parameters usingmvnrmle:

[Parameters, Covariance] = mvnrmle(Data, Design);

Estimate standard errors usingmvnrstd:

stdparameters = mvnrstd(数据,设计,协方差);

Multivariate Normal Regression With Missing Data

Estimate parameters usingecmmvnrmle:

[Parameters, Covariance] = ecmmvnrmle(Data, Design);

Estimate standard errors usingecmmvnrstd:

StdParameters = ecmmvnrstd(Data, Design, Covariance);

Least-Squares Regression

最小二乘回归或LSR,有时称为普通最小二乘或多个线性回归,是最简单的线性回归模型。它也享受着独立于基础分布的属性,它是最好的线性无偏估计器(蓝色)。

给出m=数字observations, the typical least-squares regression model seeks to minimize the objective function

k = 1 m ( Z k H k b ) T ( Z k H k b ) ,

which, within the maximum likelihood framework of the multivariate normal regression routinemvnrmle, is equivalent to a single-iteration estimation of just the parameters to obtainParameters与初始协方差矩阵Covarianceheld fixed as the identity matrix. In the case of missing data, however, the internal algorithm to handle missing data requires a separate routineecmlsrmleto do least-squares instead of multivariate normal regression.

最小二乘回归而没有缺少数据

Estimate parameters usingmvnrmle:

[参数,协方差] = mvnrmle(数据,设计,1);

Estimate standard errors usingmvnrstd:

stdparameters = mvnrstd(数据,设计,协方差);

缺少数据的最小二乘回归

Estimate parameters usingecmlsrmle:

[Parameters, Covariance] = ecmlsrmle(Data, Design);

Estimate standard errors usingecmmvnrstd:

StdParameters = ecmmvnrstd(Data, Design, Covariance);

Covariance-Weighted Least Squares

给出m=NUMSAMPLES观察,典型的协方差加权最小二乘或CWLS回归模型旨在最大程度地减少目标函数

k = 1 m ( Z k H k b ) T C 0 ( Z k H k b )

固定协方差C0.

In most cases,C0是对角线矩阵。逆矩阵 W = C 0 1 has diagonal elements that can be considered relative “weights” for each series. Thus, CWLS is a form of weighted least squares with the weights applied across series.

Covariance-Weighted Least Squares Without Missing Data

Estimate parameters usingmvnrmle:

[参数,协方差] = mvnrmle(数据,设计,1,[],[],[],covar0);

Estimate standard errors usingmvnrstd:

stdparameters = mvnrstd(数据,设计,协方差);

协方差加权最小二乘缺少数据

Estimate parameters usingecmlsrmle:

[Parameters, Covariance] = ecmlsrmle(Data, Design, [], [], [], [], Covar0);

Estimate standard errors usingecmmvnrstd:

StdParameters = ecmmvnrstd(Data, Design, Covariance);

Feasible Generalized Least Squares

An特别指定form of least squares that has surprisingly good properties for misspecified or nonnormal models is known as feasible generalized least squares, or FGLS. The basic procedure is to do least-squares regression and then to do covariance-weighted least-squares regression with the resultant residual covariance from the first regression.

可行的概括最小二乘,而无需丢失数据

Estimate parameters usingmvnrmle:

[参数,协方差] = mvnrmle(数据,设计,2,0,0);

或(明确说明FGLS过程)

[Parameters, Covar0] = mvnrmle(Data, Design, 1); [Parameters, Covariance] = mvnrmle(Data, Design, 1, [], [], [], Covar0);

Estimate standard errors usingmvnrstd:

stdparameters = mvnrstd(数据,设计,协方差);

Feasible Generalized Least Squares With Missing Data

Estimate parameters usingecmlsrmle:

[Parameters, Covar0] = ecmlsrmle(Data, Design); [Parameters, Covariance] = ecmlsrmle(Data, Design, [], [], [], [], Covar0);

Estimate standard errors usingecmmvnrstd:

StdParameters = ecmmvnrstd(Data, Design, Covariance);

Seemingly Unrelated Regression

给出a multivariate normal regression model in standard form with a数据矩阵和aDesign数组,可以通过简单的转换将问题转换为看似无关的回归(SUR)问题Designarray. The main idea of SUR is that instead of having a common parameter vector over all data series, you have a separate parameter vector associated with each separate series or with distinct groups of series that, nevertheless, share a common residual covariance. It is this ability to aggregate and disaggregate series and to perform comparative tests on each design that is the power of SUR.

转换,使用函数convert2sur,将标准形式的设计阵列转换为等效的设计阵列,以使用该系列的指定映射进行SUR进行SUR数字groups. The regression functions are used in the usual manner, but with the SUR design array instead of the original design array. Instead of havingNUMPARAMS元素,SUR输出参数向量具有数字of stacked parameter estimates, where the firstNUMPARAMS要点Parameters包含与第一组系列相关的参数估计值,下一个NUMPARAMS要点Parameters包含与第二组系列相关的参数估计,依此类推。如果模型只有一个系列,例如NUMSERIES=1,然后SUR设计阵列与原始设计阵列相同,因为SUR需要两个或多个系列来生成不同的参数估计。

给出NUMPARAMSparameters and数字具有参数向量的组(Parameters) 和数字* NUMPARAMS来自任何回归例程的元素,以下MATLAB®代码片段显示了如何用与每个参数对应的行打印SUR参数估计表,并与每个组或系列相对应:

fprintf(1,'看似无关的回归参数估计\ n');fprintf(1,'%7s',' ');fprintf(1,' Group(%3d) ',1:NumGroups); fprintf(1,'\ n');fori = 1:numparams fprintf(1,'%7D',i); ii = i;forj = 1:numgroups fprintf(1,'%12g ',param(ii));ii = ii + numparams;endfprintf(1,'\ n');endfprintf(1,'\ n');

Seemingly Unrelated Regression Without Missing Data

使用SUR设计convert2sur:

designsur = convert2sur(设计,组);

Estimate parameters usingmvnrmle:

[Parameters, Covariance] = mvnrmle(Data, DesignSUR);

Estimate standard errors usingmvnrstd:

StdParameters = mvnrstd(Data, DesignSUR, Covariance);

看似无关的回归,缺少数据

使用SUR设计convert2sur:

designsur = convert2sur(设计,组);

Estimate parameters usingecmmvnrmle:

[Parameters, Covariance] = ecmmvnrmle(Data, DesignSUR);

Estimate standard errors usingecmmvnrstd:

stdparameters = ecmmvnrstd(数据,设计,协方差);

Mean and Covariance Parameter Estimation

Without missing data, you can estimate the mean of your数据使用功能意思是以及与功能的协方差COV. Nevertheless, the functionecmnmledoes this for you if it detects an absence of missing values. Otherwise, it uses the ECM algorithm to handle missing values.

Estimate parameters usingecmnmle:

[平均值,协方差] = ecmnmle(数据);

Estimate standard errors usingecmnstd:

stdmean = ecmnstd(数据,平均值,协方差);

See Also

||||||||||||||||||

相关话题