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

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

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

## 统计代写|广义线性模型代写generalized linear model代考|Prospective and Retrospective Sampling

Consider the data shown in Table $4.1$ from a study on infant respiratory disease which shows the proportions of children developing bronchitis or pneumonia in their first year of life by type of feeding and sex, which may be found in Payne (1987):

\begin{tabular}{llll}
& Bottle Only & Some Breast with Supplement & Breast Only \
\hline Boys & $77 / 458$ & $19 / 147$ & $47 / 494$ \
Girls & $48 / 384$ & $16 / 127$ & $31 / 464$
\end{tabular}
Table $4.1$ Incidence of respiratory disease in infants to the age of 1 year.
We can recover the layout above with the proportions as follows:
data (babyfood, package=” faraway”)
xtabs (disease/ (disease + nondisease) $\sim$ sex + food, babyfood)
food
sex $\quad$ Bottle Breast Suppl
G1rl $0.125000 .066810 \quad 0.12598$
In prospective sampling, the predictors are fixed and then the outcome is observed. This is also called a cohort study. In the infant respiratory disease example shown in Table 4.1, we would select a sample of newborn girls and boys whose parents had chosen a particular method of feeding and then monitor them for their first year.

In retrospective sampling, the outcome is fixed and then the predictors are observed. This is also called a case-control study. Typically, we would find infants coming to a doctor with a respiratory disease in the first year and then record their sex and method of feeding. We would also obtain a sample of respiratory diseasefree infants and record their information. The method for obtaining the samples is important – we require that the probability of inclusion in the study is independent of the predictor values.

## 统计代写|广义线性模型代写generalized linear model代考|Prediction and Effective Doses

Sometimes we wish to predict the outcome for given values of the covariates. For binomial data this will mean estimating the probability of success. Given covariates $x_{0}$, the predicted response on the link scale is $\hat{\eta}=x_{0} \hat{\beta}$ with variance given by $x_{0}^{T}\left(X^{T} W X\right)^{-1} x_{0}$. Approximate confidence intervals may be obtained using a normal approximation. To get an answer in the probability scale, it will be necessary to transform back using the inverse of the link function. We predict the response for the insect data:
data (bliss, packagem” faraway”)
$1 \mathrm{mod}<-$ glm(cbind (dead, alive) conc, familymbinomial, data=bliss)
lmodsum <- summary (lmod)
We show how to predict the response at a dose of $2.5$ :
$x 0<-c(1,2.5)$
eta0 $<-\operatorname{sum}(x 0 * \operatorname{coe}(1 \mathrm{mod}))$
$1 \log i t(\mathrm{eta0})$
[1) $0.64129$
A $64 \%$ predicted chance of death at this dose – now compute a $95 \%$ confidence interval (CI) for this probability. First, extract the variance matrix of the coefficients:
(cm \&- lmodsum\$cov. unscaled) (Intercept)$\begin{array}{rr}\text { (Intercept) } & \text { conc } \ \text { conc } & -0.065823\end{array}$se <- sqrt$(t(x 0)$왛은$\mathrm{cm}$화화$x 0)$so the CI on the probability scale is: ilogit (c (eta0$-1.96 *$se, eta0$1.96 * \mathrm{se})$) [1)$0.534300 .73585$A more direct way of obtaining the same result is: predict (lmod, newdata data. frame (conc=2.5), se=$T$) [1]$0.58095$\$se.fit
[1] $0.2263$
1logit (c (0.58095-1.960.2263,0.58095+1.960.2263))
[1] $0.534300 .73585$
Note that in contrast to the linear regression situation, there is no distinction possible between confidence intervals for a future observation and those for the mean response. Now we try predicting the response probability at the low dose of $-5$ :
$x 0<-c(1,-5)$
se $<-\operatorname{sqrt}(t(x 0)$ 왛의 $\mathrm{cm} \mathrm{~ ㅇ}$
eta0 <- sum $(x 0 * 1 \mathrm{mod}$ scoef $)$
ilogit (c (eta0 -1.96*se, eta0 $0+1.96 * s e)$ )
[1) $2.3577 \mathrm{e}-053.6429 \mathrm{e}-03$

## 统计代写|广义线性模型代写generalized linear model代考|Matched Case-Control Studies

In a case-control study, we try to determine the effect of certain risk factors on the outcome. We understand that there are other confounding variables that may affect the outcome. One approach to dealing with these is to measure or record them, include them in the logistic regression model as appropriate and thereby control for

their effect. But this method requires that we model these confounding variables with the correct functional form. This may be difficult. Also, making an appropriate adjustment is problematic when the distribution of the confounding variables is quite different in the cases and controls. So we might consider an alternative where the confounding variables are explicitly adjusted for in the design.

In a matched case-control study, we match each case (diseased person, defective object, success, etc.) with one or more controls that have the same or similar values of some set of potential confounding variables. For example, if we have a 56-year-old, Hispanic male case, we try to match him with some number of controls who are also 56-year-old Hispanic males. This group would be called a matched set. Obviously, the more confounding variables one specifies, the more difficult it will be to make the matches. Loosening the matching requirements, for example, accepting controls who are 50-60 years old, might be necessary. Matching also gives us the possibility of adjusting for confounders that are difficult to measure. For example, suppose we suspect an environmental effect on the outcome. However, it is difficult to measure exposure, particularly when we may not know which substances are relevant. We could match subjects based on their place of residence or work. This would go some way to adjusting for the environmental effects.

Matched case-control studies also have some disadvantages apart from the difficulties of forming the matched sets. One loses the possibility of discovering the effects of the variables used to determine the matches. For example, if we match on sex, we will not be able to investigate a sex effect. Furthermore, the data will likely be far from a random sample of the population of interest. So although relative effects may be found, it may be difficult to generalize to the population.

Sometimes, cases are rare but controls are readily available. A $1: M$ design has $M$ controls for each case. $M$ is typically small and can even vary in size from matched set to matched set due to difficulties in finding matching controls and missing values. Each additional control yields a diminished return in terms of increased efficiency in estimating risk factors – it is usually not worth exceeding $M=5$.

## 统计代写|广义线性模型代写generalized linear model代考|Prospective and Retrospective Sampling

\begin{tabular}{llll} & 瓶装 & 一些含补充剂的乳房 & 仅乳房 \ \hline 男孩 & $77 / 458$ & $19 / 147$ & $47 / 494$ \ 女孩 & $48 / 384$ & $16 / 127$ & $31 / 464$ \end{表格}\begin{tabular}{llll} & 瓶装 & 一些含补充剂的乳房 & 仅乳房 \ \hline 男孩 & $77 / 458$ & $19 / 147$ & $47 / 494$ \ 女孩 & $48 / 384$ & $16 / 127$ & $31 / 464$ \end{表格}

data (babyfood, package=”faraway”)
xtabs (disease/ (disease + nondisease)∼性+食物，婴儿食品）

## 统计代写|广义线性模型代写generalized linear model代考|Prediction and Effective Doses

1米○d<−glm(cbind (dead, alive) conc, familymbinomial, data=bliss)
lmodsum <- summary (lmod)

X0<−C(1,2.5)

1日志⁡一世吨(和吨一个0)
[1) 0.64129

(cm \&- lmodsum $cov. unscaled) (Intercept) （截距） 浓 浓 −0.065823 se <- sqrt(吨(X0)哇C米华华X0) 所以概率尺度上的CI为： ilogit (c (eta0−1.96∗硒, eta01.96∗s和) ) [1) 0.534300.73585 获得相同结果的更直接的方法是： predict (lmod, newdata data.frame (conc=2.5), se=吨 ) [1] 0.58095$ se.fit
[1]0.2263
1logit (c (0.58095-1.960.2263,0.58095+1.960.2263))
[1]0.534300.73585

X0<−C(1,−5)

eta0 <- 总和(X0∗1米○d斯科夫)
ilogit (c (eta0 -1.96*se, eta00+1.96∗s和) )
[1) 2.3577和−053.6429和−03

## 有限元方法代写

tatistics-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 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。