Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment, we use data from a study on strontium-isotope stratigraphy of deep- sea sections. The data are in the package SemiPar. Use data(fossil)

image text in transcribed

image text in transcribed

In this assignment, we use data from a study on strontium-isotope stratigraphy of deep- sea sections. The data are in the package SemiPar. Use data(fossil) to access the data, and see help(fossil) for a reference on the data. For purposes of this assignment, we treat the ratio of (the number) of two different strontium isotopes as the output, y (strontium.ratio), and the age, in millions of years (age), calculated from isotope analysis, as input, x (this seems backwards to me) 1. Fit a natural cubic smoothing spline estimator, P(x) (knots at (unique) inputs). Use generalized cross-validation (GCV) to obtain the optimal smoothing parameter. The code in our notes, using the mgcv package, may be helpful here. Show your code to fit the estimator. We will use our results to create a plot, below. 2. Now, use the locfit library to fit a locally linear regression model to the fossil data using the tri-cube smoothing kernel. In our R example in our notes, we actually dio not specify the actual bandwidth parameter, X, as discussed in our notes. Instead, we specified the fraction of the data to be used within some distance of the input point, x, to be evaluated, with the kernel bandwidth being adjusted accordingly internally to somehow capture the desired fraction of nearby data. This data-adaptable kernel bandwidth seems agreeable. However, for this assignment, let's, instead, use a (globally fixed) bandwidth. For example, to specify a bandwidth of ? = 2, we would use the argument, alpha-c (0,2), in locfit, which tells locfit not to use the nearest fraction criteria (0) but usea fixed bandwidth (2). (Don't use 2! This is just an example!) Incidentally, we could specify both (non-zero) values, e.g., alpha-c(.5, 2), and the determined bandwidth would be the larger of the values determined by the two methods. But, as mentioned let's use the global bandwidth method here. So, in what follows, we will need to pass a 2-vector to the alpha argument, with zero in the first element and bandwidth in the second, when using locfit. In this assignment, we use data from a study on strontium-isotope stratigraphy of deep- sea sections. The data are in the package SemiPar. Use data(fossil) to access the data, and see help(fossil) for a reference on the data. For purposes of this assignment, we treat the ratio of (the number) of two different strontium isotopes as the output, y (strontium.ratio), and the age, in millions of years (age), calculated from isotope analysis, as input, x (this seems backwards to me) 1. Fit a natural cubic smoothing spline estimator, P(x) (knots at (unique) inputs). Use generalized cross-validation (GCV) to obtain the optimal smoothing parameter. The code in our notes, using the mgcv package, may be helpful here. Show your code to fit the estimator. We will use our results to create a plot, below. 2. Now, use the locfit library to fit a locally linear regression model to the fossil data using the tri-cube smoothing kernel. In our R example in our notes, we actually dio not specify the actual bandwidth parameter, X, as discussed in our notes. Instead, we specified the fraction of the data to be used within some distance of the input point, x, to be evaluated, with the kernel bandwidth being adjusted accordingly internally to somehow capture the desired fraction of nearby data. This data-adaptable kernel bandwidth seems agreeable. However, for this assignment, let's, instead, use a (globally fixed) bandwidth. For example, to specify a bandwidth of ? = 2, we would use the argument, alpha-c (0,2), in locfit, which tells locfit not to use the nearest fraction criteria (0) but usea fixed bandwidth (2). (Don't use 2! This is just an example!) Incidentally, we could specify both (non-zero) values, e.g., alpha-c(.5, 2), and the determined bandwidth would be the larger of the values determined by the two methods. But, as mentioned let's use the global bandwidth method here. So, in what follows, we will need to pass a 2-vector to the alpha argument, with zero in the first element and bandwidth in the second, when using locfit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions