MY-ASSIGNMENTEXPERT™可以为您提供 soe.ucsc.edu STAT209 Generalized Linear Models广义线性模型的代写代考和辅导服务!
这是圣克鲁斯加利福尼亚大学 广义线性模型的代写成功案例。
STAT209课程简介
Theory, methods, and applications of generalized linear statistical models; review of linear models; binomial models for binary responses (including logistical regression and probit models); log-linear models for categorical data analysis; and Poisson models for count data. Case studies drawn from social, engineering, and life sciences.
Course description and background: This is a graduate-level course on the theory, methods and applications of Generalized Linear Models (GLMs). Emphasis will be placed on statistical modeling, building from standard normal linear models, extending to GLMs, and briefly covering more specialized topics. With regard to inference, prediction, and model assessment, we will study both likelihood and Bayesian methods. In particular, within the Bayesian modeling framework, we will discuss practically important hierarchical extensions of the standard GLM setting.
Prerequisites
Note that this is a course on methods for GLMs, rather than a course on using software for data analysis with GLMs. Students will be expected to be familiar with statistical software R, which will be used to illustrate the methods with data examples as part of the homework assignments (and exam). For data analysis problems involving Bayesian GLMs, you will be expected to write your own programs to fit Bayesian models using Markov chain Monte Carlo posterior simulation methods (R will suffice for this).
STAT209 Generalized Linear Models HELP(EXAM HELP, ONLINE TUTOR)
Write the WLS procedures (which correspond to the ML procedures in GLM) using R to estimate the model parameters for the Mice example (P.3-5) in the lecture note. Calculate the estimates and the standard error estimates over iterations. You are suggested to use $(0.1,0.1)$ as starting values.
The AirPassengers data in The $\mathrm{R}$ Datasets Package contain the following number of passengers in each month during 1949-1960.
AirPassengers
Jan Feb Mar Apr May Jun Jul Aug Sep Dct Nov Dec
$\begin{array}{lllllllllllll}1949 & 112 & 118 & 132 & 129 & 121 & 135 & 148 & 148 & 136 & 119 & 104 & 118\end{array}$
$\begin{array}{lllllllllllll}1950 & 115 & 126 & 141 & 135 & 125 & 149 & 170 & 170 & 158 & 133 & 114 & 140\end{array}$
$\begin{array}{lllllllllllll}1951 & 145 & 150 & 178 & 163 & 172 & 178 & 199 & 199 & 184 & 162 & 146 & 166\end{array}$
$1954204 \quad 188235227234264 \quad 302293 \quad 259 \quad 229203 \quad 229$
$1957315 \quad 301 \quad 356348 \quad 355422465467404 \quad 347 \quad 305 \quad 336$
$$
\begin{array}{lllllllllllll}
1958 & 340 & 318 & 362 & 348 & 363 & 435 & 491 & 505 & 404 & 359 & 310 & 337 \
1959 & 360 & 342 & 406 & 396 & 420 & 472 & 548 & 559 & 463 & 407 & 362 & 405 \
1960 & 417 & 391 & 419 & 461 & 472 & 535 & 622 & 606 & 508 & 461 & 390 & 432
\end{array}
$$
The following plots show the trends across month and across year.
(a) Fit a quadratic quantile regression model (M1) (without log-transformation) against month (1:12 as $X$ variable) at quantile levels $0.025,0.05,0.1,0.25,0.5,0.75,0.9,0.95$, 0.975. Include also a mean regression model for comparison. Report all parameter estimates. Provide a fitted line plot and a plot to show changes of parameters across quantile level.
(b) By running only a mean regression model, comment whether a cubic model without log-transformation (M2) and a quadratic model with log-transformation (M3) provides better fit than the quadratic model (M1) in (a).
(c) The above plot show a linear increasing trend across year. Add year as one more covariate to M1 and re-fit another quadratic quantile regression model (M4) at quantile level 0.75. Forecast the number of passengers during Dec, 1962 .
The maximum likelihood estimates for the parameters in the generalized linear model are obtained via an iterative weighted least squares algorithm with modified response variable
$$
z_i=\eta_i+\left(y_i-\mu_i\right) / \frac{\partial \mu_i}{\partial \eta_i}
$$
and weights given by
$$
W_i=\frac{1}{V_i}\left(\frac{\partial \mu_i}{\partial \eta_i}\right)^2
$$
where $\mu_i=E\left(Y_i\right), V_i=\operatorname{Var}\left(Y_i\right)$ and $\eta_i=\sum_{j=1}^p x_{i j} \beta_j$.
Let $Y_i$ be a Poisson random variable with mean $\mu_i$.
(a) Calculate the weight $\boldsymbol{W}$ for fitting the model
$$
\ln \mu_i=\beta_0+\beta_1 x_i, \quad i=1, \ldots, n .
$$
(b) Obtain an expression for the asymptotic variance of the maximum likelihood estimator for $\beta_1$.
The following data provide the times until subjects showed signs of motion sickness when placed in a cubical cabin mounted on a hydraulic piston and subjected to vertical motion for up to 120 minutes. The censored times are marked with an asterisk.
$$
30,50,50^, 51,66^, 82,92,120,120^, 120^, 120^, 120^, 120^*
$$
(a) Find the Kaplan Meier (KM) estimator of $\widehat{S}(t)$ and plot $S(t)$ using R. Show your calculation of the probability $S(90)$ of surviving at least 90 minutes before showing signs of motion sickness.
(b) The variance of the KM estimator for the survival probability is given by
$$
\operatorname{Var}[\widehat{S}(t)] \simeq[\widehat{S}(t)]^2 \sum_{j: t_j \leq t} \frac{d_j}{r_j\left(r_j-d_j\right)} .
$$
Prove the result using the following steps and apply the result to calculate the variance of the KM estimator in (a).
(i) Let $X$ be a random variable with mean $\mu$ and variance $\sigma^2$. If $Y=f(X)$, where $f$ is a differentiable function, show that $\operatorname{Var}(Y) \simeq\left[f^{\prime}(\mu)\right]^2 \sigma^2$.
(ii) Let $\widehat{L}(t)=\ln [\widehat{S}(t)]$. Find an estimator for $\operatorname{Var}[\widehat{L}(t)]$.
(iii) Hence show the result of $\operatorname{Var}[\widehat{S}(t)]$ in (1).
MY-ASSIGNMENTEXPERT™可以为您提供 SOE.UCSC.EDU STAT209 GENERALIZED LINEAR MODELS广义线性模型的代写代考和辅导服务