首页 >
> 详细

THE UNIVERSITY OF HONG KONG

DEPARTMENT OF STATISTICS AND ACTUARIAL SCIENCE

STAT 6014/7614 Advanced Statistical Learning

Assignment 3

Due Date: December 5, 2019

1. The dataset ozone.csv records the level of atmospheric ozone concentration and two

meteorological variables at different locations in the Los Angeles basin in 1976. The response,

referred to as ozone (O3), is the logarithm of the daily maximum of the hourly-average ozone

concentrations (ppm) in Upland, California. The other two variables are temperature in qF

(temp) and inversion base height in feet (ibh). The first few lines of the dataset is shown

below:

> head(ozone)

(a) Use R to determine the univariate kernel density estimate for the response variables O3

using Sheather and Jones’ plug-in rule for bandwidth selection. How are the ozone levels

(logarithm transformed) distributed without taking account of the other variables?

(b) Use R to fit a generalized additive model with O3 as response and temp, ibh as additive

explanatory variables. You may choose a response distribution based on the result obtained

in part (a). Write down the equation of the fitted model with necessary details including

definitions of all involved coefficients (if applicable) and regression/smoothing terms.

(c) Construct partial prediction plots for the model fitted in part (b).

(d) Is there any linear relationship between O3 and the explanatory variables revealed from the

fit plots obtained in part (c)? Use R to perform Chi-square test to confirm.

(e) Use R to refine the model based on the result in part (d). Write down the final fitted model.

(f) From the results obtained above, how does the GAM compare to a GLIM for this dataset?

Explain briefly. (You don’t need to fit the GLIM.)

2. To fit a nonparametric model ܻ based on a data set, the

smoothing spline estimator is obtained by minimizing

with respect to the regression function ݉, where is the smoothing parameter and.

(a) Is it reasonable to replace the second order derivative ݉′′ by the first order derivative ݉′

in the objective function ? Explain briefly.

(b) What solution for will be obtained for → ∞ ?

(c) Below are three smoothing splines fitted for a given data set, for which three values of

the smoothing parameter,0.0007, 0.02, 0.5, are used. Identify the value of ߣ used

for each estimate.

(d) Suppose that a sample of size is observed as and a

smoothing spline is being fitted. The following is a dialogue between two students.

Alice: “A cubic function can be uniquely defined by 4 points. Since the fitted regression

function must be a natural cubic spline, the resulting fit should be a cubic function

perfectly interpolating the data.”

Bob: “How about the value of ? The choice of the smoothing parameter ߣ would

affect the fitted model. I don’t think the fitted regression function must be a

perfect interpolation.”

Briefly comment on their claims.

Estimate A Estimate B Estimate C

19/20, 1st termP. 3

3. The dataset typhoon.csv records the annual numbers of typhoon signal no. 8 issued in

Hong Kong from 1956 to 2018, and the first few lines are shown below:

> head(typhoon)

(a) Use R to fit a three-state Poisson-HMM to the annual numbers of typhoon signals.

(b) Draw a state transition diagram to show the architecture of the fitted HMM, including

estimates of the model parameters.

(c) Use Viterbi decoding to determine the most likely state path for 2014 to 2018.

(d) Use posterior decoding to determine the most likely states for 2014 to 2018.

(e) Based on the state for year 2018 obtained in part (d), estimate the expected number of

typhoon signal no. 8 that will be issued in 2019.

4. The ASIA data set is a small synthetic data set from Lauritzen and Spiegelhalter (1988) that

tries to implement a diagnostic model for lung diseases (tuberculosis, lung cancer, or

bronchitis) after a visit to Asia. The original data set contains the following variables:

A visit to Asia recently (no / yes)

S smoker (no / yes)

T has tuberculosis (no / yes)

L has lung cancer (no / yes)

B has bronchitis (no / yes)

X positive chest X-ray results (no / yes)

D shortness-of-breath (dyspnea) symptom (no / yes)

Since the results of a single chest X-ray do not discriminate between lung cancer and

tuberculosis, a deterministic variable E is added and determined from the values in variables

T and L:

E tuberculosis or lung cancer (no / yes)

19/20, 1st termP. 4

The first few lines of the data set asia.csv are shown below:

> head(asia)

A S T L B E X D

1 no yes no no yes no no yes

2 no yes no no no no no no

3 yes no yes no no yes yes yes

4 no no no no yes no no yes

5 no no no no no no no yes

6 no yes no no no no no yes

(a) Use R package bnlearn to fit a Bayesian network by hill-climbing algorithm.

(b) Write down the joint probability as a product of conditional probabilities according to the

network structure determined in part (a).

(c) Based on what was suggested from the network structure, state “True” or “False” or

“Uncertain” for each of the following statements.

(i) Node L d-separates node S and node X.

(ii) A recent visit to Asia affects the chance of the presence of dyspnea.

(iii) For a smoker with positive chest X-ray results, whether he/she had recently visit

Asia does not affect his/her risk of having bronchitis.

(d) Write down the Markov blanket of node E.

(e) According to the fitted Bayesian network, how likely is that a non-smoker with positive

chest X-ray results would be suffering from tuberculosis?

联系我们

- QQ：99515681
- 邮箱：99515681@qq.com
- 工作时间：8:00-23:00
- 微信：codinghelp

- Data留学生作业代做、代写r程序语言作业、代做r课程设计作业、代写boos 2019-12-13
- 代写cmt307留学生作业、代做machine Learning作业、代写p 2019-12-13
- Comp2050作业代做、Computer Science作业代写、代做ja 2019-12-13
- 代写compsci 671D作业、代做modeling留学生作业、代写r程序 2019-12-13
- 代做gui留学生作业、代做programming课程作业、Java程序语言作 2019-12-13
- 代做framework课程作业、Java程序设计作业代写、Java实验作业代 2019-12-13
- Ae2ace留学生作业代写、代做stock Trading作业、Java编程 2019-12-13
- Eee101留学生作业代做、Programming作业代写、C++编程语言作 2019-12-13
- Csci 340作业代做、代写java程序语言作业、代做java实验作业代写 2019-12-12
- Data课程作业代做、代写nbershade作业、代做r课程设计作业、代写r 2019-12-12
- 代写csci 1100作业、Program课程作业代做、Python语言作业 2019-12-12
- Data留学生作业代做、代写sql实验作业、Sql编程有作业调试、Pseud 2019-12-12
- 代做g6077留学生作业、System课程作业代写、代做web编程语言作业、 2019-12-12
- 代写comp529作业、代做analysis留学生作业、代写java语言作业 2019-12-12
- Ce235留学生作业代写、Program课程作业代写、C/C++程序语言作业 2019-12-12
- 代写system留学生作业、代做python语言作业、代写java，C/C+ 2019-12-12
- 代写ma705留学生作业、代写python程序语言作业、代写python实验 2019-12-11
- Stat 3312作业代做、R语言作业代写、代做r编程设计作业、代写sas 2019-12-11
- Comp201作业代做、代写software Engineering作业、J 2019-12-11
- Statistics 3022作业代做、代写data留学生作业、R编程设计作 2019-12-11