# 统计代写|广义线性模型代写generalized linear model代考|STAT6175

## 统计代写|广义线性模型代写generalized linear model代考|Ordinal Variables

Some variables have a natural order. We can use the methods for nominal variables described earlier in this chapter, but more information can be extracted by taking advantage of the structure of the data. Sometimes we might identify a particular ordinal variable as the response. In such cases, the methods of Section $7.4$ can be used. However, sometimes we are interested in modeling the association between ordinal variables. Here the use of scores can be helpful.

Consider a two-way table where both variables are ordinal. We may assign scores $u_i$ and $v_j$ to the rows and columns such that $u_1 \leq u_2 \leq \cdots \leq u_I$ and $v_1 \leq v_2 \leq \cdots \leq v_J$. The assignment of scores requires some judgment. If you have no particular prefer-ence, even spacing allows for the simplest interpretation. If you have an interval scale, for example, 0-10 years old, 10-20 years old, 20-40 years old and so on, midpoints are often used. It is a good idea to check that the inference is robust to the assignment of scores by trying some reasonable alternative choices. If your qualitative conclusions are changed, this is an indication that you cannot make any strong finding.
Now fit the linear-by-linear association model:
$$\log E Y_{i j}=\log \mu_{i j}=\log n p_{i j}=\log n+\alpha_i+\beta_j+\gamma u_i v_j$$
So $\gamma=0$ means independence while $\gamma$ represents the amount of association and can be positive or negative. $\gamma$ is rather like an (unscaled) correlation coefficient. Consider underlying (latent) continuous variables which are discretized by the cutpoints $u_i$ and $v_j$. We can then identify $\gamma$ with the correlation coefficient of the latent variables. Consider an example drawn from a subset of the 1996 American National Election Study (Rosenstone et al. (1997)). Using just the data on party affiliation and level of education, we can construct a two-way table.

## 统计代写|广义线性模型代写generalized linear model代考|Multinomial Logit Model

As with the binary response model, we must find a way to link the probabilities $p_{i j}$ to the predictors $x_i$, while ensuring that the probabilities are restricted between zero and one. We can use a similar idea:
$$\eta_{i j}=x_i^T \beta_j=\log \frac{p_{i j}}{p_{i 1}}, \quad j=2, \ldots, J$$
We must obey the constraint that $\sum_{j=1}^J p_{i j}=1$, so it is convenient to declare one of the categories as the baseline, say, $j=1$. So we get $p_{i 1}=1-\sum_{j=2}^J p_{i j}$ and have:
$$p_{i j}=\frac{\exp \left(\eta_{i j}\right)}{1+\sum_{j=2}^J \exp \left(\eta_{i j}\right)}$$
Note that $\eta_{i 1}=0$. It does not matter which category is declared as the baseline although some choices may be more convenient for interpretation. We may estimate the parameters of this model using maximum likelihood and then use the standard methods of inference.

Consider an example drawn from a subset of the 1996 American National Election Study (Rosenstone et al. (1997)). For simplicity, we consider only the age,education level and income group of the respondents. Our response will be the party identification of the respondent: Democrat, Independent or Republican. The original data involved more than three categories; we collapse this to three, again for simplicity of the presentation.

# 广义线性模型代考

## 统计代写|广义线性模型代写generalized linear model代考|Ordinal Variables

$$\log E Y_{i j}=\log \mu_{i j}=\log n p_{i j}=\log n+\alpha_i+\beta_j+\gamma u_i v_j$$

## 统计代写|广义线性模型代写generalized linear model代考|Multinomial Logit Model

$$\eta_{i j}=x_i^T \beta_j=\log \frac{p_{i j}}{p_{i 1}}, \quad j=2, \ldots, J$$

$$p_{i j}=\frac{\exp \left(\eta_{i j}\right)}{1+\sum_{j=2}^J \exp \left(\eta_{i j}\right)}$$

myassignments-help数学代考价格说明

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

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

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

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

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