SlideShare une entreprise Scribd logo
Etude des Séries Temporelles
avec Stata
1
Données sur le PIB Américain
2
• Série: PIB Américain à prix courants, en milliards de dollars
. tsline GDPconstant
• La tendance est la caractéristique visuelle la plus dominante
• D’après le graphique la croissance du PIB semble exponentielle
3
• Pour modéliser la tendance, il est utile de trouver une transformation
qui représente la série comme fonction linéaire du temps.
• Une transformation logarithmique peut-être appropriée
. gen lnGDP=ln( GDPconstant)
. tsline lnGDP
4
_cons 29.36914 .0144353 2034.53 0.000 29.34012 29.39816
Year .0273101 .0004927 55.43 0.000 .0263195 .0283007
lnGDP Coefficient Std. err. t P>|t| [95% conf. interval]
Total 7.8873725 49 .160966786 Root MSE = .05027
Adj R-squared = 0.9843
Residual .121313661 48 .002527368 R-squared = 0.9846
Model 7.76605884 1 7.76605884 Prob > F = 0.0000
F(1, 48) = 3072.79
Source SS df MS Number of obs = 50
. reg lnGDP Year
Estimation de la tendance de croissance annuelle du PIB
De 1972 à 2021, l’économie américaine a connu une croissance
annuelle de 2,7% en moyenne
5
Lissage de la série du PIB
. predict tendance
(option xb assumed; fitted values)
. predict residus, residual
(3 missing values generated)
. replace residus=-residus
(50 real changes made)
. tssmooth hwinters hw= lnGDP, forecast(3)
. gen hwR=hw- lnGDP
(3 missing values generated)
6
. tsline tendance hw
7
Comparaison des deux méthodes de lissage
Comparaison des Résidus
8
Prévisons
9
L’approche de Box et
Jenkins
10
Etapes de la Méthode
• C’est une méthode itérative à 4 étapes:
1. Identification:
Détermination de l’ordre p et q du processus ARMA
2. Estimation
Estimation des paramètres 𝑎0,, 𝐴 𝐿 , 𝛽 𝐿 𝑒𝑡 𝜎𝜀
²
3. Diagnostic
Tests statistiques pour juger de l’adéquation du modèle
4. Prévision
11
Etape 1: Identification
• Série non stationnaire.. ARMA?
• Stationnariser la série:
– Éliminer la composante tendancielle
– Faire la différence première (ou seconde) sur la
série: ARMA(p,q)  ARIMA(p,d,q)
d étant le nombre de fois que la série a été différenciée afin d’atteindre la
stationnarité
12
Détermination de l’ordre d’intégration
13
. ac lnGDP, lag(15)
Intégration d’odre 1
14
. gen growth= lnGDP-L.lnGDP
. ac growth , lag(15)
Fonction d’autocorrélation partielle
15
. pac growth , lag(15)
Etape 2: Estimation
16
arima growth, arima(1,0,0)
arima lnGDP, arima(1,1,0)
/sigma .0203486 .0021211 9.59 0.000 .0161914 .0245059
L1. .1538497 .1300135 1.18 0.237 -.1009721 .4086714
ar
ARMA
_cons .0265499 .0038209 6.95 0.000 .0190612 .0340387
lnGDP
D.lnGDP Coefficient std. err. z P>|z| [95% conf. interval]
OPG
Log likelihood = 121.3023 Prob > chi2 = 0.2367
Wald chi2(1) = 1.40
Sample: 2 thru 50 Number of obs = 49
ARIMA regression

Contenu connexe

En vedette

2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
 
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
 
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
 
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
 
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 

En vedette (20)

2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
 
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
 
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
 
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
 
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 

Stata- Séries Temp..pptx

  • 1. Etude des Séries Temporelles avec Stata 1
  • 2. Données sur le PIB Américain 2
  • 3. • Série: PIB Américain à prix courants, en milliards de dollars . tsline GDPconstant • La tendance est la caractéristique visuelle la plus dominante • D’après le graphique la croissance du PIB semble exponentielle 3
  • 4. • Pour modéliser la tendance, il est utile de trouver une transformation qui représente la série comme fonction linéaire du temps. • Une transformation logarithmique peut-être appropriée . gen lnGDP=ln( GDPconstant) . tsline lnGDP 4
  • 5. _cons 29.36914 .0144353 2034.53 0.000 29.34012 29.39816 Year .0273101 .0004927 55.43 0.000 .0263195 .0283007 lnGDP Coefficient Std. err. t P>|t| [95% conf. interval] Total 7.8873725 49 .160966786 Root MSE = .05027 Adj R-squared = 0.9843 Residual .121313661 48 .002527368 R-squared = 0.9846 Model 7.76605884 1 7.76605884 Prob > F = 0.0000 F(1, 48) = 3072.79 Source SS df MS Number of obs = 50 . reg lnGDP Year Estimation de la tendance de croissance annuelle du PIB De 1972 à 2021, l’économie américaine a connu une croissance annuelle de 2,7% en moyenne 5
  • 6. Lissage de la série du PIB . predict tendance (option xb assumed; fitted values) . predict residus, residual (3 missing values generated) . replace residus=-residus (50 real changes made) . tssmooth hwinters hw= lnGDP, forecast(3) . gen hwR=hw- lnGDP (3 missing values generated) 6
  • 7. . tsline tendance hw 7 Comparaison des deux méthodes de lissage
  • 10. L’approche de Box et Jenkins 10
  • 11. Etapes de la Méthode • C’est une méthode itérative à 4 étapes: 1. Identification: Détermination de l’ordre p et q du processus ARMA 2. Estimation Estimation des paramètres 𝑎0,, 𝐴 𝐿 , 𝛽 𝐿 𝑒𝑡 𝜎𝜀 ² 3. Diagnostic Tests statistiques pour juger de l’adéquation du modèle 4. Prévision 11
  • 12. Etape 1: Identification • Série non stationnaire.. ARMA? • Stationnariser la série: – Éliminer la composante tendancielle – Faire la différence première (ou seconde) sur la série: ARMA(p,q)  ARIMA(p,d,q) d étant le nombre de fois que la série a été différenciée afin d’atteindre la stationnarité 12
  • 13. Détermination de l’ordre d’intégration 13 . ac lnGDP, lag(15)
  • 14. Intégration d’odre 1 14 . gen growth= lnGDP-L.lnGDP . ac growth , lag(15)
  • 16. Etape 2: Estimation 16 arima growth, arima(1,0,0) arima lnGDP, arima(1,1,0) /sigma .0203486 .0021211 9.59 0.000 .0161914 .0245059 L1. .1538497 .1300135 1.18 0.237 -.1009721 .4086714 ar ARMA _cons .0265499 .0038209 6.95 0.000 .0190612 .0340387 lnGDP D.lnGDP Coefficient std. err. z P>|z| [95% conf. interval] OPG Log likelihood = 121.3023 Prob > chi2 = 0.2367 Wald chi2(1) = 1.40 Sample: 2 thru 50 Number of obs = 49 ARIMA regression