首页 >
> 详细

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
- 微信：codinghelp2

- Tsp课程作业代写、代做algorithms留学生作业、代做java，C/C 2020-06-23
- Kit107留学生作业代做、C++编程语言作业调试、Data课程作业代写、代 2020-06-23
- Sta302h1f作业代做、代写r课程设计作业、代写r编程语言作业、代做da 2020-06-22
- 代写seng 474作业、代做data Mining作业、Python，Ja 2020-06-22
- Cmpsci 187 Binary Search Trees 2020-06-21
- Comp226 Assignment 2: Strategy 2020-06-21
- Math 504 Homework 12 2020-06-21
- Math4007 Assessed Coursework 2 2020-06-21
- Optimization In Machine Learning Assig... 2020-06-21
- Homework 1 – Math 104B 2020-06-20
- Comp1000 Unix And C Programming 2020-06-20
- General Specifications Use Python In T... 2020-06-20
- Comp-206 Mini Assignment 6 2020-06-20
- Aps 105 Lab 9: Search And Link 2020-06-20
- Aps 105 Lab 9: Search And Link 2020-06-20
- Mech 203 – End-Of-Semester Project 2020-06-20
- Ms980 Business Analytics 2020-06-20
- Cs952 Database And Web Systems Develop... 2020-06-20
- Homework 4 Using Data From The China H... 2020-06-20
- Assignment 1 Build A Shopping Cart 2020-06-20