Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit


 

STAT 219 Final Project: Smoothing

 

As in all exploratory data analyses, you need to get to know the individual variables first before examining the relationships among them. In this project, you will select a data set of interest with two quantitative variables whose relationship you wish to examine, explore it graphically and summarize your observations!

Visit the Data Is Plural website (https://www.data-is-plural.com/) and find a topic in the archive with a

data set that interests you! Each archived newsletter contains multiple topics and data sets. Students cannot use a data set that someone else is using - register your chosen data set here by Sunday 12/5 at 11:59pm:

Data Set Registration

You will be implementing smoothing techniques on the data, so search for data that contains at least TWO quantitative variables, both of which are NOT time.  Also, your data cannot be already aggregated like Census data, it must be individual observations. If you choose a very, very large data set, you will need to take a random sample of, say, 500.

Document Formatting Requirements:

●  Use R Markdown compiled to PDF, not Word or HTML.

●  Put all R code in an appendix at the end and do not echo the code within the paper.

●  Margins must be 1 inch.

●  Prose should have 1.5 spacing.

● You may use base R graphics or ggplot graphics.

● In your prose, you may use tables to organize information or thoughts if you wish, but be efficient on spacing.

●  PROOFREAD all of your work and use the spell check!

●  The document should be 8 pages prior to the appendix containing the code (3 pages text, 5 pages graphics).

●  Use \newpage to create page breaks where necessary to ensure the prose and graphics are on their own pages.

The provided template has much of this already set up for you!  If you use it, make sure you update the headers and title information in an appropriate and descriptive way! This is a formal paper, treat it that way.

Submit your compiled PDF to Gradescope by the deadline, Wednesday 12/15/21 at 11:59pm. No late projects are accepted.


Part 0: Introduction

The first page of this project should be your header with the rest of the page filled with an introduction to the data you have chosen and what relationship you plan to explore.  Include any information that is pertinent to this exploration including the sample size and/or any restrictions. Include which variable is the predictor and response. This should not spill over to page 2.

Part 1:  Kernel Density Estimation

In this part, you will provide an exploration of your TWO main quantitative variables of interest using histograms and kernel density estimates. For each of the two quantitative variables create a 3x3 panel of graphics including:

●  3 histograms, each with a different bandwidth selector resulting in different-looking graphics,

●  3 density estimates using different kernels (pick one bandwidth from above),

●  and 3 density estimates using the SAME kernel (pick one!) but different bandwidths.

This 3x3 panel should be a full page graphic (fig.width=8,  fig.height=10.25).  Titles should indicate what is being shown and explore the usage of the graphical parameters mai and oma within the par() function

to customize base R graphic panels.

Discuss the impacts of the modeling selections on how the story is told for each variable. Include discussion on if the particular choices are appropriate for the data.

This write-up should be 1 full page, split among the two variables.

Part 2:  Bivariate Smoothers

Now as we wish to explore the relationship between the two quantitative variables, we aim to smooth the

data to see a story about how the predictor impacts the response variable.

●  Kernel Smoothing: Create another 3x3 full page panel of graphics showing Friedman’s local averaging with 2 span selections plus the cross validated one (3 graphs), then Nadaraya-Watsons’s kernel smoother using all combinations of each of the two available kernels and 3 bandwidths.

●  Local Polynomial Smoothing: For each linear and cubic polynomials, choose 3 spans and create two 3x1 panels of graphics (one for linear and one for cubic).

Compare and contrast the stories told by the various smoothers and discuss appropriateness. This write-up should also be 1 page.