## 统计代写|线性回归分析代写linear regression analysis代考|Method of Lagrange Multipliers

Let $\mathbf{Y}=\mathbf{X} \beta+\varepsilon$, where $\mathbf{X}$ is $n \times p$ of full rank $p$. Suppose that we wish to find the minimum of $\varepsilon^{\prime} \varepsilon$ subject to the linear restrictions $\mathbf{A} \boldsymbol{\beta}=\mathbf{c}$, where A is a known $q \times p$ matrix of rank $q$ and $\mathrm{c}$ is a known $q \times 1$ vector. One method of solving this problem is to use Lagrange multipliers, one for each linear constraint $\mathbf{a}i^{\prime} \beta=c_i(i=1,2, \ldots, q)$, where $\mathbf{a}_i^{\prime}$ is the $i$ th row of $\mathbf{A}$. As a first step we note that \begin{aligned} \sum{i=1}^q \lambda_i\left(\mathbf{a}_i^{\prime} \boldsymbol{\beta}-c_i\right) &=\lambda^{\prime}(\mathbf{A} \boldsymbol{\beta}-\mathbf{c}) \ &=\left(\boldsymbol{\beta}^{\prime} \mathbf{A}^{\prime}-\mathbf{c}^{\prime}\right) \boldsymbol{\lambda} \end{aligned}
(since the transpose of a $1 \times 1$ matrix is itself). To apply the method of Lagrange multipliers, we consider the expression $r=\varepsilon^{\prime} \varepsilon+\left(\beta^{\prime} \mathbf{A}^{\prime}-\mathbf{c}^{\prime}\right) \boldsymbol{\lambda}$ and solve the equations
and $\partial r / \partial \beta=0$; that is (from A.8),
$$\mathbf{A} \beta=\mathrm{c}$$
$$-2 \mathbf{X}^{\prime} \mathbf{Y}+2 \mathbf{X}^{\prime} \mathbf{X} \boldsymbol{\beta}+\mathbf{A}^{\prime} \boldsymbol{\lambda}=\mathbf{0} \text {. }$$
For future reference we denote the solutions of these two equations by $\hat{\beta}_H$ and $\hat{\lambda}_H$. Then, from (3.36),
\begin{aligned} \hat{\boldsymbol{\beta}}_H &=\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{X}^{\prime} \mathbf{Y}-\frac{1}{2}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime} \hat{\lambda}_H \ &=\hat{\boldsymbol{\beta}}-\frac{1}{2}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime} \hat{\lambda}_H, \end{aligned}
and from (3.35),
\begin{aligned} \mathbf{c} &=\mathbf{A} \hat{\boldsymbol{\beta}}_H \ &=\mathbf{A} \hat{\boldsymbol{\beta}}-\frac{1}{2} \mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime} \hat{\boldsymbol{\lambda}}_H . \end{aligned}
Since $\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1}$ is positive-definite, being the inverse of a positive-definite matrix, $\mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}$ is also positive-definite (A.4.5) and therefore nonsingular. Hence
$$-\frac{1}{2} \hat{\lambda}_H=\left[\mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}\right]^{-1}(\mathbf{c}-\mathbf{A} \hat{\beta})$$
and substituting in (3.37), we have
$$\hat{\boldsymbol{\beta}}_H=\hat{\boldsymbol{\beta}}+\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}\left[\mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}\right]^{-1}(\mathbf{c}-\mathbf{A} \hat{\boldsymbol{\beta}}) .$$

## 统计代写|线性回归分析代写linear regression analysis代考|Method of Orthogonal Projections

It is instructive to derive (3.38) using the theory of B.3. In order to do this, we first “shift” c, in much the same way that we shifted $\pi$ across into the left-hand side of Example 3.5.
Suppose that $\boldsymbol{\beta}0$ is any solution of $\mathbf{A} \boldsymbol{\beta}=\mathbf{c}$. Then $$\mathbf{Y}-\mathbf{X} \beta_0=\mathbf{X}\left(\beta-\beta_0\right)+\varepsilon$$ or $\tilde{\mathbf{Y}}=\mathbf{X} \gamma+\varepsilon$, and $\mathbf{A} \gamma=\mathbf{A} \boldsymbol{\beta}-\mathbf{A} \boldsymbol{\beta}_0=0$. Thus we have the model $\tilde{\mathbf{Y}}=\boldsymbol{\theta}+\varepsilon$, where $\boldsymbol{\theta} \in \Omega=\mathcal{C}(\mathbf{X})$, and since $\mathbf{X}$ has full rank, $\mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{X}^{\prime} \boldsymbol{\theta}=\mathbf{A} \gamma=0$. Setting $\mathbf{A}_1=\mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{X}^{\prime}$ and $\omega=\mathcal{N}\left(\mathbf{A}_1\right) \cap \Omega$, it follows from B.3.3 that $\omega^{\perp} \cap \Omega=\mathcal{C}\left(\mathbf{P}{\Omega} \mathbf{A}1^{\prime}\right)$, where $$\mathbf{P}{\Omega} \mathbf{A}1^{\prime}=\mathbf{X}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{X}^{\prime} \mathbf{X}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}=\mathbf{X}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}$$ is $n \times q$ of rank $q$ (by Exercises $3 \mathrm{~g}$, No. 5, below). Therefore, by B.3.2, \begin{aligned} \mathbf{P}{\Omega}-\mathbf{P}\omega &=\mathbf{P}{\omega \perp \cap \Omega} \ &=\left(\mathbf{P}{\Omega} \mathbf{A}_1^{\prime}\right)\left[\mathbf{A}_1 \mathbf{P}{\Omega}^2 \mathbf{A}1^{\prime}\right]^{-1}\left(\mathbf{P}{\Omega} \mathbf{A}1^{\prime}\right)^{\prime} \ &=\mathbf{X}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}\left[\mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}\right]^{-1} \mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{X}^{\prime} \end{aligned} Hence \begin{aligned} \mathbf{X} \hat{\boldsymbol{\beta}}_H-\mathbf{X} \boldsymbol{\beta}_0 &=\mathbf{X} \hat{\gamma}_H=\mathbf{P}\omega \tilde{\mathbf{Y}}=\mathbf{P}{\Omega} \tilde{\mathbf{Y}}-\mathbf{P}{\omega \perp \cap \Omega} \tilde{\mathbf{Y}} \ &=\mathbf{P} \Omega \mathbf{Y}-\mathbf{X} \boldsymbol{\beta}_0-\mathbf{X}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}\left[\mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{X}^{\prime}\right]^{-1}(\mathbf{A} \hat{\boldsymbol{\beta}}-\mathbf{c}) \end{aligned}

# 线性回归分析代考

## 统计代写|线性回归分析代写linear regression analysis代考|Method of Lagrange Multipliers

$$\sum i=1^q \lambda_i\left(\mathbf{a}_i^{\prime} \boldsymbol{\beta}-c_i\right)=\lambda^{\prime}(\mathbf{A} \boldsymbol{\beta}-\mathbf{c}) \quad=\left(\boldsymbol{\beta}^{\prime} \mathbf{A}^{\prime}-\mathbf{c}^{\prime}\right) \boldsymbol{\lambda}$$
(因为一个转置 $1 \times 1$ 矩阵本身) 。为了应用拉格朗日乘子法，我们考虑表达式 $r=\varepsilon^{\prime} \varepsilon+\left(\beta^{\prime} \mathbf{A}^{\prime}-\mathbf{c}^{\prime}\right) \lambda$ 解方程 和 $\partial r / \partial \beta=0$; 即 (来自 A.8)，
$$\mathbf{A} \beta=\mathrm{c}$$
$$-2 \mathbf{X}^{\prime} \mathbf{Y}+2 \mathbf{X}^{\prime} \mathbf{X} \boldsymbol{\beta}+\mathbf{A}^{\prime} \boldsymbol{\lambda}=\mathbf{0} .$$

$$\hat{\boldsymbol{\beta}}_H=\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{X}^{\prime} \mathbf{Y}-\frac{1}{2}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime} \hat{\lambda}_H \quad=\hat{\boldsymbol{\beta}}-\frac{1}{2}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime} \hat{\lambda}_H,$$

$$\mathbf{c}=\mathbf{A} \hat{\boldsymbol{\beta}}_H \quad=\mathbf{A} \hat{\boldsymbol{\beta}}-\frac{1}{2} \mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime} \hat{\boldsymbol{\lambda}}_H .$$

$$-\frac{1}{2} \hat{\lambda}_H=\left[\mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}\right]^{-1}(\mathbf{c}-\mathbf{A} \hat{\beta})$$

$$\hat{\boldsymbol{\beta}}_H=\hat{\boldsymbol{\beta}}+\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}\left[\mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}\right]^{-1}(\mathbf{c}-\mathbf{A} \hat{\boldsymbol{\beta}}) .$$

## 统计代写|线性回归分析代写linear regression analysis代考|Method of Orthogonal Projections

$$\mathbf{Y}-\mathbf{X} \beta_0=\mathbf{X}\left(\beta-\beta_0\right)+\varepsilon$$

$$\mathbf{P} \Omega \mathbf{A} 1^{\prime}=\mathbf{X}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{X}^{\prime} \mathbf{X}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}=\mathbf{X}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}$$

$$\mathbf{P} \Omega-\mathbf{P} \omega=\mathbf{P} \omega \perp \cap \Omega=\left(\mathbf{P} \Omega \mathbf{A}_1^{\prime}\right)\left[\mathbf{A}_1 \mathbf{P} \Omega^2 \mathbf{A} 1^{\prime}\right]^{-1}\left(\mathbf{P} \Omega \mathbf{A} 1^{\prime}\right)^{\prime}=\mathbf{X}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}\left[\mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}\right]^{-1} \mathbf{A}($$

$$\mathbf{X} \hat{\boldsymbol{\beta}}_H-\mathbf{X} \boldsymbol{\beta}_0=\mathbf{X} \hat{\gamma}_H=\mathbf{P} \omega \tilde{\mathbf{Y}}=\mathbf{P} \Omega \tilde{\mathbf{Y}}-\mathbf{P} \omega \perp \cap \Omega \tilde{\mathbf{Y}} \quad=\mathbf{P} \Omega \mathbf{Y}-\mathbf{X} \boldsymbol{\beta}_0-\mathbf{X}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{A}^{\prime}\left[\mathbf{A}\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{X}\right.$$

myassignments-help数学代考价格说明

1、客户需提供物理代考的网址，相关账户，以及课程名称，Textbook等相关资料~客服会根据作业数量和持续时间给您定价~使收费透明，让您清楚的知道您的钱花在什么地方。

2、数学代写一般每篇报价约为600—1000rmb，费用根据持续时间、周作业量、成绩要求有所浮动(持续时间越长约便宜、周作业量越多约贵、成绩要求越高越贵)，报价后价格觉得合适，可以先付一周的款，我们帮你试做，满意后再继续，遇到Fail全额退款。

3、myassignments-help公司所有MATH作业代写服务支持付半款，全款，周付款，周付款一方面方便大家查阅自己的分数，一方面也方便大家资金周转，注意:每周固定周一时先预付下周的定金，不付定金不予继续做。物理代写一次性付清打9.5折。

Math作业代写、数学代写常见问题

myassignments-help擅长领域包含但不是全部: