#### 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

# ANOVA (ANalysis Of VAriance) Part I

Posted 2020-10-13 by Wilfried. Post 5 of 13.
ANOVAgraphs Hypothesis_Testing

A step by step guide to perform a single-factor ANOVA

Family-Wise Error Rate (FWER)

Let's first have a look at the code below:

rm(list = ls())
n<-2:20
m<-factorial(n)/(factorial(n-2)*factorial(2))
p<- 1- (1-0.05)^m
plot(n,p, main='Probability to observe at least 1 false discovery', xlab='Number of samples')
grid()

# Non-Linear Fitting (lots of points)

Posted 2020-10-09 by Wilfried. Post 4 of 13.
FittingΧ2 graphs

Non-linear fitting with R (lots of points, with error bars). I also discuss how some parameters can give statistical information regarding the quality of the fit

For this example, I use ggplot2 and so you need to enter:

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

# Fitting multiple data at once

Posted 2020-10-08 by Wilfried. Post 3 of 13.
BeginnerFitting graphs

Here, I demonstrate how to fit multiple data at once using an easy script

For this example, I use ggplot2 and so you need to enter:

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

# Non-Linear Fitting

Posted 2020-10-07 by Wilfried. Post 2 of 13.
FittingΧ2 graphs

Non-linear fitting with R (few points, with error bars). I also discuss how some parameters can give statistical information regarding the quality of the fit

As an example of non-linear fitting, I will perform a Michaelis Menten fit on some synthetic data. I am using 3 vectors, which represent the Substrate concentration (S), the rate of product formation (v) as well as the error on v (dv).

rm(list = ls())
# data (use c to create a vector and combine elements of identical types)
v<-c(0.004507692,0.004192308,0.00355384,0.002576923,0.001661538,0.001064286)
S<-c(3.6000,1.8000,0.9000,0.4800,0.2250,0.1125)
dv<-c(0.00012, 0.00008,  0.00012, 0.00010, 0.00007, 0.00005)