01.11.2012 Views

Homework 2

Homework 2

Homework 2

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

c) Simulate data using the following data generating process in TSP and implement the local<br />

linear regression based on the Gaussian kernel. Use Silverman’s rule of thumb and crossvalidation<br />

to determine the bandwidth parameter h. For cross validation, implement grid<br />

search around the rule of thumb estimate. Compare the results.<br />

TSP–Code:<br />

options crt,mem=20,double,limwarn=0;<br />

supres smpl;<br />

options crt, mem=20;<br />

smpl 1 100; set nob = @nob;<br />

set seedin =14;<br />

random(seedin=14) x eps;<br />

y = 1+ x -x^2 + eps/3;<br />

sort(all) x;<br />

msd(noprint,all) x;<br />

SET H00h00=@Stddev;<br />

if @iqr/1.349

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!