This project was developed for the course of "Nonparametric Statistics" held at Politecnico di Milano in the academic year 2022-2023.
🏆 This was the highest ranking project in its year batch.
We present a nonparametric analysis of the evolution of dairy production and consumption in the United States from 1980 to 2021. Starting from the needs of a stakeholders which is about to enter the market, we present a step-by-step analysis and the findings to provide meaningful information to optimize production and pricing. We also provide an outlier analysis in terms of years and, in the last part, a spatial analysis and a clustering of the types of cheese.
git clone https://github.com/SmearyTundra/nonparametric-analysis-US-dairy-production-consumption
Install the required packages from CRAN
packages_list <-
c(
"tidyverse",
"ggplot2",
"mgcv",
"rgl",
"splines",
"conformalInference",
"pbapply",
"parallel",
"DepthProc",
"progress",
"dbscan",
"beadplexr",
"robustbase",
"readxl",
"tidyr",
"car",
"sp",
"visreg",
"mgcViz",
"usmap",
"raster",
"sf",
"maps",
"ggspatial",
"BNPTSclust",
"roahd",
"fda.usc",
"npsp"
)
install.packages(packages_list)
The repository contains different files to perform the analysis, here we report their explanation together with a hyperlink to the knitted PDF version:
01-Conformal-Prediction.pdf
contains the implementation of the prediction intervals using a conformal approach.02-Permutation-Tests-for-GAM.pdf
contains the permutation tests performed to reduce GAM and keep significant covariates only.03-GAM.pdf
provides the implementation for the GAM model and the reverse percentile bootstrap confindence intervals.04-Robustness.pdf
contains the robust regression used to detect years outliers.05-Spatial-GAM.pdf
empowers a GAM using spatial coordinates, while05-Spatial-Nonparametric.pdf
implements a nonparametric kriging.06-Functional-Depth.pdf
contains the Bayesian nonparametric clustering as well as an exploratory analysis of such clusters using depth measures.
The final presentations can be found here:
The final report can be found here:
- Teo Bucci (@teobucci)
- Filippo Cipriani (@SmearyTundra)
- Gabriele Corbo (@gabrielecorbo)
- Andrea Puricelli (@apuri99)