### 统计代写|回归分析作业代写Regression Analysis代考|STA4210

statistics-lab™ 为您的留学生涯保驾护航 在代写回归分析Regression Analysis方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写回归分析Regression Analysis代写方面经验极为丰富，各种代写回归分析Regression Analysis相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 统计代写|回归分析作业代写Regression Analysis代考|Evaluating the Constant Variance

The first graph you should use to evaluate the constant variance assumption is the $\left(\hat{y}_i, e_i\right)$ scatterplot. Look for changes in the pattern of vertical variability of the $e_i$ for different $\hat{y}_i$. The most common indications of constant variance assumption violation are shapes that indicate either increasing variability of $Y$ for larger $\mathrm{E}(Y \mid X=x)$, or shapes that indicate decreasing variability of $Y$ for larger $\mathrm{E}(Y \mid X=x)$. Increasing variability of $Y$ for larger $\mathrm{E}(Y \mid X=x)$ is indicated by greater variability in the vertical ranges of the $e_i$ when $\hat{y}_i$ is larger.
Recall again that the constant variance assumption (like all assumptions) refers to the data-generating process, not the data. The statement “the data are homoscedastic” makes no sense. By the same logic, the statements “the data are linear” and “the data are normally distributed” also are nonsense. Thus, whichever pattern of variability that you decide to claim based on the $\left(\hat{y}_i, e_i\right)$ scatterplot, you should try to make sense of it in the context of the subject matter that determines the data-generating process. As one example, physical boundaries on data force smaller variance when the data are closer to the boundary. As another, when income increases, people have more choice as to whether or not they choose to purchase an item. Thus, there should be more variability in expenditures among people with more money than among people with less money. Whatever pattern you see in the $\left(\hat{y}_i, e_i\right)$ scatterplot should make sense to you from a subject matter standpoint.

While the LOESS smooth to the $\left(\hat{y}_i, e_i\right)$ scatterplot is useful for checking the linearity assumption, it is not useful for checking the constant variance assumption. Instead, you should use the LOESS smooth over the plot of $\left(\hat{y}_i,\left|e_i\right|\right)$. When the variability in the residuals is larger, they will tend to be farther from zero, giving larger mean absolute residuals $\left|e_i\right|$. An increasing trend in the $\left(\hat{y}_i,\left|e_i\right|\right)$ plot suggests larger variability in $Y$ for larger $\mathrm{E}(Y \mid X=x)$, and a flat trend line for the $\left(\hat{y}_i,\left|e_i\right|\right)$ plot suggests that the variability in $Y$ is nearly unrelated to $\mathrm{E}(Y \mid X=x)$. However, as always, do not over-interpret. Data are idiosyncratic (random), so even if homoscedasticity is true in reality, the LOESS fit to the $\left(\hat{y}_i,\left|e_i\right|\right)$ graph will not be a perfectly flat line, due to chance alone. To understand “chance alone” in this case you can simulate data from a homoscedastic model, construct the $\left(\hat{y}_i,\left|e_i\right|\right)$ graph, and add the LOESS smooth. You will see that the LOESS smooth is not a perfect flat line, and you will know that such deviations are explained by chance alone.

The hypothesis test for homoscedasticity will help you to decide whether the observed deviation from a flat line is explainable by chance alone, but recall that the test does not answer the real question of interest, which is “Is the heteroscedasticity so bad that we cannot use the homoscedastic model?” (That question is best answered by simulating data sets having the type of heteroscedasticity you expect with your real data, then by performing the types of analyses you plan to perform on your real data, then by evaluating the performance of those analyses.)

## 统计代写|回归分析作业代写Regression Analysis代考|Evaluating the Constant Variance Assumption

Consider the $\left(\hat{y}_i, \mid e_i\right)$ scatterplot in the right-hand panel of Figure 4.7. In that plot, there is an increasing trend that suggests heteroscedasticity. You can test for trend in the $\left(\hat{y}_i,\left|e_i\right|\right)$ scatterplot by fitting an ordinary regression line to those data, and then testing for significance of the slope coefficient. Significance $(p<0.05)$ means that the observed trend is not easily explained by chance alone under the homoscedastic model; insignificance $(p>0.05)$ means that the observed trend is explainable by chance alone under the homoscedastic model. This test is called the Glejser test (Glejser 1969).

There are many tests for heteroscedasticity other than the Glejser test, including the “Breusch-Pagan test” and “White’s test.” These tests use absolute and/or squared values of the residuals. Because absolute and squared residuals are non-negative, the assumption of normality of the absolute and squared residuals is obviously violated. Hence these tests are only approximately valid.

Another approach to testing heteroscedasticity is to model the variance function $\operatorname{Var}(Y \mid X=x)=g(x, \theta)$ explicitly within a model that uses a reasonable (perhaps nonnormal) distribution for $Y \mid X=x$, then to estimate the model using maximum likelihood, and then to test for constant variance in the context of that model using the likelihood ratio test. This approach is better because it identifies the nature of the heteroscedasticity explicitly, which may be an end unto itself in your research. This approach is also better because you can use the resulting heteroscedastic variance function $g(x, \theta)$ to obtain weighted least-squares (WLS) estimates of the $\beta$ ‘s that are better than the ordinary least-squares (OLS) estimates. Chapter 12 discusses these issues further.

## 广义线性模型代考

statistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。