This repository contains my master's thesis for the M.Sc. Economics programme at University Bonn. It contains both the code, as well as the tex file for creating the paper. This thesis is mostly based on the papers "Functional Data Analysis for Density Functions by Transformation to a Hilbert Space" (2016) and "Fréchet Regression for Random Objects with Euclidean Predictors" (2019) from Alexander Petersen and Hans-Georg Müller.
NOTE: This project is unfinished and will be worked over at a later point in time (December 2023). The text is very unfinished, and the simulation needs some more interesting scenarios to compare both methods.
The three Jupyter notebooks in src / frechet_fda contain all the code done to illustrate the methods and compute the simulations. They are somewhat differentiated into a notebook that tries to reproduce methods and results from Petersen & Müller (2016), one to reproduce the methods from Petersen & Müller (2019) as well as do a simulation study, and one to produce and save all the plots to use in the thesis.
The file function_class.py contains the ubiquitous Function object I defined to represent the distribution objects in my code. The file function_tools.py contains most of the heavy used tools (including the LQD and inverse LQD transformation).
To get started, create and activate the environment with
$ conda env create -f environment.yml
$ conda activate frechet_fda
Using this environment, it should be possible to just run the code in the Jupyter notebooks.
This project was created with cookiecutter and the econ-project-templates.