#### Institut de Physique et Chimie des Matériaux de Strasbourg

[ -- Internship Proposals -- ]

A blog for physicists or biologists. Mainly for experimentalists interested in Statistics. R scripts detailed and explained.

CONTACT

wilfried.grangeu-paris.fr

Associate Professor at Université de Paris

# Image Filtering with FFT

Posted 2021-03-02 by Wilfried. Post 13 of 13.
FFTImage Signal

How to process (filter) images with FFT using 'simple' R functions

In this post, I show how to remove some 'noisy' patterns in an image. I will use 'simple' mathematical transformations (Fourier transform) that allow to efficiently process images.

  rm(list=ls()) # clear memory
if (!require(viridis)) install.packages('viridis')

# Change point Detection Part III

Posted 2020-12-22 by Wilfried. Post 12 of 13.
LikelihoodHypothesis_Testing AIC

Change point detection. Part III : multiple change points and states

In a time series, change point detection tries to identify abrupt changes. In a previous post we have learned how to identify single change points using likelihood estimates and AIC values. Here, I show how to identify multiple change points states (i.e. statistically identical data).

# packages
rm(list=ls()) # clear memory
if (!require(ggplot2)) install.packages('ggplot2')

# Is it all about Statistics ?

Posted 2020-12-15 by Wilfried. Post 11 of 13.
tidyversegraphs Fitting

R is not just for statistics. It is also a powerful tool for manipulating and displaying data.

I have the feeling that students sometimes think R is just for statistics. But R is also a perfect environment for organizing and displaying data without doing fancy statistics. That is what I show here using real data and taking advantage of the famous yet powerful package tidyverse.

rm(list = ls())
if (!require(tidyverse)) install.packages('tidyverse')

# Change point Detection Part II

Posted 2020-12-05 by Wilfried. Post 10 of 13.
LikelihoodHypothesis_Testing AIC

Change point detection. Part II : maximum likelihood estimates

In a time series, change point detection tries to identify abrupt changes. Different approaches have been proposed and here I show one of them based on maximum likelihood estimates. I also recommend to have a look at this website (which is a wonderful introduction to change point detection using Likelihood ratio tests), this R package from R. Killick and I.A. Eckley and this paper (for a real-word application).

Data

Let's start and define some parameters (I will come back to this latter) and generate some data.

rm(list = ls())
# parameters
penalty<-10 # Delta AIC penalty
display<-1 # display all graphs during calculations (good to see what is going on)
sd<-1 # sd is known and set here as 1
# data