UNC-Chapel Hill BIOS 740 - Locally weighted polynomial regression

Unformatted text preview:

Locally weighted polynomial regressionFinally, we’ll try the kernel method on the birthrate data. We’ll use loess in the packagemodreg.YoucanuseCpas in the other methods, which depends onσ2e. For natural splinesand smoothing splines, we tried four estimates, so I’ll just stick with those. The best df ’sfor the variousσ2e’s:σ2eNatural spline Smoothing spline Loess11.54 47 43 3617.7629 39 36147.177109181.48799So df = 9 looks like a good try for a smooth fit, and df = 36 f or a rough fit. The firstone:lo <- loess(birthrate[,1]~birthrate[,2],enp.target=9)plot(birthrate[,2],birthrate[,1],xlab="Year",ylab="Birthrate",main="df = 9")lines(birthrate[,2],birthrate[,1]-lo$res)The enp.target is the number of equivalent parameters, which should be the df .Forsome reason, this number is not exactly the trace of the smoother matrix, but it’s closeenough.1920 1940 1960150 200 250df = 9YearBirthrate1Cf, the smoothing spline at df = 10:1920 1930 1940 1950 1960 1970150 200 250df=10YearBirthrateNice! The rougher:21920 1940 1960150 200 250df = 36YearBirthrateCf, the smoothing spline at df = 43:31920 1930 1940 1950 1960 1970150 200 250Smoothing spline, df=43xyTo compare the residual sums of squares for various procedures, all with df = 10:Polynomial: 4363.026Natural spline: 3937.721Smoothing spline: 3863.780Loess:


View Full Document

UNC-Chapel Hill BIOS 740 - Locally weighted polynomial regression

Download Locally weighted polynomial regression
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Locally weighted polynomial regression and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Locally weighted polynomial regression 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?