Commit beb32f85 authored by Jerome Dauvergne's avatar Jerome Dauvergne

creating file

parent 65e1811f
...@@ -70,7 +70,7 @@ $p=p(t)$. Pour relier $p(t)$ à $t$, on va donc effectuer une ...@@ -70,7 +70,7 @@ $p=p(t)$. Pour relier $p(t)$ à $t$, on va donc effectuer une
régression logistique. régression logistique.
```{r} ```{r}
logistic_reg = glm(data=data, Malfunction/Count ~ Temperature, weights=Count, logistic_reg = glm(data=data, Malfunction/Count ~ + Pressure, weights=Count,
family=binomial(link='logit')) family=binomial(link='logit'))
summary(logistic_reg) summary(logistic_reg)
``` ```
......
---
title: "Analyse de l'incidence du syndrome grippal"
author: "Jerome E. Dauvergne"
date: "2025-04-28"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Préparation des données
Les données proviennent du réseau Sentinelle : https://www.sentiweb.fr/france/fr/?page=table
Nous avons téléchargé le fichier pour la France Métropolitaine.
## Téléchargement
```{r}
data_url = "https://www.sentiweb.fr/datasets/all/inc-3-PAY.csv"
data = read.csv(data_url,
skip = 1,
na.strings = c("-"))
```
Regardons les données :
```{r}
head(data)
tail(data)
```
Regardons les données manquantes
```{r}
ligne_na <- apply(data, 1, function(x) any(is.na)))
data[ligne_na,]
```
Pas de données manquantes.
Toutes les variables sont des entiers exceptées geo_insee et geo_name. Par contre les dates sont au format ISO (= année et numéro de semaine).
```{r}
data$date <- paste0(substring(data$week, 1, 4), "-W", substring(data$week, 5, 6))
```
## Inspection
Quelle allure a la courbe ?
```{r}
plot(data$week, data$inc, type="l", xlab="Date", ylab="Incidence hebdomadaire")
with(head(data, 1000), plot(week, inc, type="l", xlab="Date", ylab="Incidence hebdomadaire"))
```
## Analyse
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment