Hmw II: Regression, Package Development
- Due : April 27 2025
- Work in pairs
- Deliver your work through a github repository
- Present your work (10 minutes) on 2025-04-29 between 11:00 and 13:00 (Olympe de Gouges 358)
Objectives
This homework is about
- developping methods for objects produced by functions like
gpava()
andactiveSet()
from packageisotone
(R
) - applying monotone regression techniques to a dataset.
I. Supplementing the broom
and the ggfortify
packages
The broom
package offers S3
generic functions for building dataframes from the output of a variety of statistical techniques (for example lm
, prcomp
, or kmeans
): augment()
, tidy()
, and glance()
.
The first goal of this homework is to design and code methods for generic functions augment
, tidy
, glance
, and autoplot
for classes gpava
and activeSet
defined in the isotone
package (monotone regression).
Package ggplot2
offers a generic function autoplot()
. See Tidyverse documentation on autoplot
. Package ‘ggfortify’ offers a large collection of methods for autoplot
.
More generally have a look at automatic plotting Also have a look at autolayer()
generic in ggplot2
.
II. Applying monotone regression methods to real data
The Abalone
dataset can be obtained from UIC Machine learning repository site The usual problem consists in predicting age (rings) as a function of the other variables (this is a regression problem).
You are expected to conduct exploratory analysis on this dataset. Besides linear regression of the response variable with respect to the others, you shall fit a monotone regression function to the dataset. Use the functions developped in the first part of the homework to discuss your results.
Use the quarto
package for reproducible research to write your report.
The report should be rendered at least in HTML format, and possibly also in PDF format.
Package development
The function and methods coded in this homework should be delivered as a package
.
Follow the package development guidelines in R Packages (2e).
- Define a dedicated rstudio project for this homework
- Don’t forget documentation and testing
References
- Advanced R Programming
- Packages
- Programming with/for
ggplot2
- Programming with
dplyr
tidyeval
helpers- Cheatsheets
- Package
isotone
on CRAN
Criterion | Points | Details |
---|---|---|
Documentation/Report | 40% | English/French |
Testing | 25% | |
Coding | 35% |