Posted on Categories:Linear Regression, 数据科学代写, 线性回归, 统计代写, 统计代考

# 统计代写|线性回归代写Linear Regression代考|BIOS6070 Main Effects, Interactions, and Indicators

avatest™

## avatest™帮您通过考试

avatest™的各个学科专家已帮了学生顺利通过达上千场考试。我们保证您快速准时完成各时长和类型的考试，包括in class、take home、online、proctor。写手整理各样的资源来或按照您学校的资料教您，创造模拟试题，提供所有的问题例子，以保证您在真实考试中取得的通过率是85%以上。如果您有即将到来的每周、季考、期中或期末考试，我们都能帮助您！

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 统计代写|线性回归代写Linear Regression代考|Main Effects, Interactions, and Indicators

Section $1.4$ explains interactions, factors, and indicator variables in an abstract setting when $Y \Perp \boldsymbol{x} \mid \boldsymbol{x}^{T} \boldsymbol{\beta}$ where $\boldsymbol{x}^{T} \boldsymbol{\beta}$ is the sufficient predictor (SP). MLR is such a model. The Section $1.4$ interpretations given in terms of the SP can be given in terms of $E(Y \mid \boldsymbol{x})$ for MLR since $E(Y \mid \boldsymbol{x})=\boldsymbol{x}^{T} \boldsymbol{\beta}=S P$ for MLR.

Definition 3.5. Suppose that the explanatory variables have the form $x_{2}, \ldots, x_{k}, x_{j j}=x_{j}^{2}, x_{i j}=x_{i} x_{j}, x_{234}=x_{2} x_{3} x_{4}$, et cetera. Then the variables $x_{2}, \ldots, x_{k}$ are main effects. A product of two or more different main effects is an interaction. A variable such as $x_{2}^{2}$ or $x_{7}^{3}$ is a power. An $x_{2} x_{3}$ interaction will sometimes also be denoted as $x_{2}: x_{3}$ or $x_{2} * x_{3}$.

Definition 3.6. A factor $W$ is a qualitative random variable. Suppose $W$ has $c$ categories $a_{1}, \ldots, a_{c}$. Then the factor is incorporated into the MLR model by using $c-1$ indicator variables $x_{W j}=1$ if $W=a_{j}$ and $x_{W j}=0$ otherwise, where one of the levels $a_{j}$ is omitted, e.g. use $j=1, \ldots, c-1$. Each indicator variable has 1 degree of freedom. Hence the degrees of freedom of the $c-1$ indicator variables associated with the factor is $c-1$.

Rule of thumb 3.3. Suppose that the MLR model contains at least one power or interaction. Then the corresponding main effects that make up the powers and interactions should also be in the MLR model.

Rule of thumb $3.3$ suggests that if $x_{3}^{2}$ and $x_{2} x_{7} x_{9}$ are in the MLR model, then $x_{2}, x_{3}, x_{7}$, and $x_{9}$ should also be in the MLR model. A quick way to check whether a term like $x_{3}^{2}$ is needed in the model is to fit the main effects models and then make a scatterplot matrix of the predictors and the residuals, where the residuals $r$ are on the top row. Then the top row shows plots of $x_{k}$ versus $r$, and if a plot is parabolic, then $x_{k}^{2}$ should be added to the model. Potential predictors $w_{j}$ could also be added to the scatterplot matrix. If the plot of $w_{j}$ versus $r$ shows a positive or negative linear trend, add $w_{j}$ to the model. If the plot is quadratic, add $w_{j}$ and $w_{j}^{2}$ to the model. This technique is for quantitative variables $x_{k}$ and $w_{j}$.

## 统计代写|线性回归代写Linear Regression代考|Variable Selection

Variable selection, also called subset or model selection, is the search for a subset of predictor variables that can be deleted without important loss of information. A model for variable selection in multiple linear regression can be described by
$$Y=\boldsymbol{x}^{T} \boldsymbol{\beta}+e=\boldsymbol{\beta}^{T} \boldsymbol{x}+e=\boldsymbol{x}{S}^{T} \boldsymbol{\beta}{S}+\boldsymbol{x}{E}^{T} \boldsymbol{\beta}{E}+e=\boldsymbol{x}{S}^{T} \boldsymbol{\beta}{S}+e$$
where $e$ is an error, $Y$ is the response variable, $\boldsymbol{x}=\left(\boldsymbol{x}{S}^{T}, \boldsymbol{x}{E}^{T}\right)^{T}$ is a $p \times 1$ vector of predictors, $\boldsymbol{x}{S}$ is a $k{S} \times 1$ vector, and $\boldsymbol{x}{E}$ is a $\left(p-k{S}\right) \times 1$ vector. Given that $\boldsymbol{x}{S}$ is in the model, $\boldsymbol{\beta}{E}=\mathbf{0}$ and $E$ denotes the subset of terms that can be eliminated given that the subset $S$ is in the model.

Since $S$ is unknown, candidate subsets will be examined. Let $\boldsymbol{x}{I}$ be the vector of $k$ terms from a candidate subset indexed by $I$, and let $\boldsymbol{x}{O}$ be the vector of the remaining predictors (out of the candidate submodel). Then
$$Y=\boldsymbol{x}{I}^{T} \boldsymbol{\beta}{I}+\boldsymbol{x}{O}^{T} \boldsymbol{\beta}{O}+e .$$
Definition 3.7. The model $Y=\boldsymbol{x}^{T} \boldsymbol{\beta}+e$ that uses all of the predictors is called the full model. A model $Y=\boldsymbol{x}{I}^{T} \boldsymbol{\beta}{I}+e$ that only uses a subset $\boldsymbol{x}{I}$ of the predictors is called a submodel. The full model is always a submodel. The sufficient predictor (SP) is the linear combination of the predictor variables used in the model. Hence the full model has $S P=\boldsymbol{x}^{T} \boldsymbol{\beta}$ and the submodel has $S P=\boldsymbol{x}{I}^{T} \boldsymbol{\beta}_{I}$

## 统计代写|线性回归代写Linear Regression代考|Variable Selection

$$Y=\boldsymbol{x}^{T} \boldsymbol{\beta}+e=\boldsymbol{\beta}^{T} \boldsymbol{x}+e=\boldsymbol{x} S^{T} \boldsymbol{\beta} S+\boldsymbol{x} E^{T} \boldsymbol{\beta} E+e=\boldsymbol{x} S^{T} \boldsymbol{\beta} S+e$$

$$Y=\boldsymbol{x} I^{T} \boldsymbol{\beta} I+\boldsymbol{x} O^{T} \boldsymbol{\beta} O+e .$$

## MATLAB代写

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