This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Tutorial 2: suggested solution 1.
Suppose we have observations (Xi , Yi ) sorted according to X : ..., (0.5, 1.2), (0.6, 1.4), (0.7, 1.5), (0.8, 1.7), (0.9, 1.5), (1.0, 2), (1.1, 2.2), (1.2, 1.6), (1.3, 1.7), (1.4, 1.9), (1.5, 1.7), .... If we use Epanechnikov kernel with bandwidth h = 0.3. (a) Estimate the density function of X at X = 1.0 (b) Estimate the regression function value m(1.0) in model Y = m(X ) + ε (a) ˆ f (1) = 0.75 ∗ {(1 − (1 − 0.8)2 /0.32 ) +(1 − (1 − 0.9)2 /0.32 ) +(1 − (1 − 1)2 /0.32 ) +(1 − (1 − 1.1)2 /0.32 ) +(1 − (1 − 1.2)2 /0.32 )}/(n ∗ 0.3) (b) m(1) = {(1 − (1 − 0.8)2 /0.32 ) ∗ 1.7 ˆ +(1 − (1 − 0.9)2 /0.32 ) ∗ 1.5 +(1 − (1 − 1)2 /0.32 ) ∗ 2 + (1 − (1 − 1.1)2 /0.32 ) ∗ 2.2 +(1 − (1 − 1.2)2 /0.32 ) ∗ 1.6}/{(1 − (1 − 0.8)2 /0.32 ) +(1 − (1 − 0.9)2 /0.32 ) +(1 − (1 − 1)2 /0.32 ) +(1 − (1 − 1.1)2 /0.32 ) +(1 − (1 − 1.2)2 /0.32 )} 2.
Consider the regression Yi = m(Xi ) + εi . we need to estimate the regression function m(x) at a given point x. Let a = m(x). Then the kernel estimator is the minimizer of a to the following problem
−1 n 2 n {Yi − a} Kh (Xi − x)
i=1 Prove it. Let d −1 n da i.e. −2n
−1 n {Yi − a}2 Kh (Xi − x) = 0.
i=1 n {Yi − a}Kh (Xi − x) = 0
i=1 1 we have the solution
n n a=
i=1 Kh (Xi − x)Yi /
i=1 Kh (Xi − x). 3. A retrospective sample of males in a heartdisease highrisk region of the Western Cape, South Africa. There are roughly two controls per case of CHD. Many of the CHD positive men have undergone blood pressure reduction treatment and other programs to reduce their risk factors after their CHD event. In some cases the measurements were made after these treatments. These data are taken from a larger dataset, described in Rousseauw et al, 1983, South African Medical Journal. Dependent variables are sbp: systolic blood pressure; tobacco: cumulative tobacco (kg); ldl: low densiity lipoprotein cholesterol; adiposity; famhist: family history of heart disease (1:Present, 0:Absent); typea: typeA behavior; obesity; alcohol: current alcohol consumption; age: age at onset. Dependent variable chd: response, coronary heart disease. (data) Use kernel smoothing method to estimate the functional regression relation between the (continuous) dependent variables and the response (dependent variables). What is your choices of bandwidth for the calculations by observing the estimated curves. chd against sbp (cude) 1.0 q qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq qqqqq q q q qq qq qq chd 0.0 0.2
qq qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq q qqqq q q qq qq qq q q 0.4 0.6 0.8 qq q q 100 120 140 160 sbp 180 200 220 2 ...
View
Full
Document
This note was uploaded on 10/04/2010 for the course STAT ST4240 taught by Professor Xiayingcun during the Fall '09 term at National University of Singapore.
 Fall '09
 XIAYingcun

Click to edit the document details