Vous êtes sur la page 1sur 179
Using R for Introductory Econometrics fooler a eS) Using R for Introductory Econometrics Florian Heiss 152, Continuous Distributions: Histogram and Density .. 37 153, Empirical Cumulative Dis- tribution Function (ECDF). 38 Contents 15.4. Fundamental Statisties... 40 16. Probability Distributions 41 1.6.1, Discrete Distributions... 41 Preece co. ei eel as iy 4 1.6.2, Continuous Distributions. 43 1.63, Cumulative — Distribution 1. Introduction Function (CDF)... . u 1.1. Getting Started 16.4. Random Draws from Prob- 1.1.1, Software . ability Distributions 2... 45 1.1.2, 17. Confidence Intervals and. Statisti- 1.13. : cal Inference... av 114, File names and the Wark: 17. Confidence Interval a7 ing Directory : 8 172. # Tests 50 1.15. Errors and Warnings... 9 173. p Values 5I i Stein, Resources... i 174. Automatic calculations... 52 : ee 18, Advanced R 2 56 fan = Calculations and Ob- 1 1.8.1. Conditional Execution... 56 1.82. Loops. . 56 2 ees ee 183. Functions’ | 57 : s* me ing Ve Oe 19. Monte Carlo Simulation 58 1.25. Matrices 4 16 19.1, Finite Sample Properties of Tee ie pe years = Estimators . 58 13. Data Frames and Data Files .... 20 Si. ae ae wmptotic Properties of 13.1. Data Frames... ... 20 mene ‘1 i Subse ot Dea a it 1.93, Simulation ‘of Confidence 134. Basie Information an a Intervals and fTests .... Gf DataSet... 22 ne est ee epon of Tet 23 |. Regression Analysis with Cross- 1.3.6. Import and Baportof Ober Sectional Data 67 Data Formats ..... 4 Using R for Introductory Econometrics 137. DataSets inthe Examples. 25 2 The Simple Regression Model oe © Florian Heiss 2016. All rights reserved. td: Graphien 5 fda geveiae 26 21, Simple OLS Regression....... 69 14.1. BasicGraphs .... 2 22 eee Fitted Values, and _ iat si pklinke Sat aie te Companion website: http://www. URETE net ue ee oe sr 28 2.3. Goodness of Fit . - 7 143. Overlaying Several Plots 29 24. Nonlinearities . . . 79 ‘Adirese 1.44. Legends 30 25. Regression through the Origin and Universitatsstrae 1, Geb, 24.31.01.24 145, Exporting toaFile ... 32 Regression on a Constant ..... 80 40225 Dusseldorf, Germany 1.46. Advanced Graphs ..... 33 26. Expected Values, Variances, and 15. Descriptive Statistics 34 Standard Errors... . - 82 ISBN: 978-1523285136 15.1. Discrete Distributions: Pre- 2.7. Monte Carlo Simulations . 84 ISBN-10; 1523285133 quencies and Contingency 27.1, Onesample .... 84 Tibley ed 34 2.7.2. Many Samples 86