An Introduction to Oxmetricstm 7
Total Page:16
File Type:pdf, Size:1020Kb
Jurgen A. Doornik An Introduction to OxMetricsTM 7 OxMetrics 7 Published by Timberlake Consultants Ltd www.timberlake.co.uk www.timberlake-consultancy.com www.oxmetrics.net, www.doornik.com An Introduction to OxMetricsTM 7 A Software System for Data Analysis and Forecasting Copyright c 2013 Jurgen A Doornik First published by Timberlake Consultants in 2005 Revised in 2007, 2009, 2013 All rights reserved. No part of this work, which is copyrighted, may be reproduced or used in any form or by any means { graphic, electronic, or mechanical, including photocopy, record taping, or information storage and retrieval systems { without the written consent of the Publisher, except in accordance with the provisions of the Copyright Designs and Patents Act 1988. Whilst the Publisher has taken all reasonable care in the preparation of this book, the Publisher makes no representation, express or implied, with regard to the accuracy of the information contained in this book and cannot accept any legal responsability or liability for any errors or omissions from the book, or from the software, or the consequences thereof. British Library Cataloguing-in-Publication Data A catalogue record of this book is available from the British Library Library of Congress Cataloguing-in-Publication Data A catalogue record of this book is available from the Library of Congress Jurgen A Doornik p. cm. { (An Introduction to OxMetricsTM 7 A Software System for Data Analysis and Forecasting) ISBN 978-0-9571708-0-3 Published by Timberlake Consultants Ltd Unit B3, Broomsleigh Business Park 842 Greenwich Lane London SE26 5BN, UK Union, NJ 07083-7905, U.S.A. http://www.timberlake.co.uk http://www.timberlake-consultancy.com Trademark notice All Companies and products referred to in this book are either trademarks or regis- tered trademarks of their associated Companies. Contents Front matter iii Contentsv List of Figures xiii List of Tables xv Preface xvii 1 Introduction and Overview3 1.1 Supported platforms........................3 1.1.1 Folder structure......................4 1.2 What is new?............................4 1.3 Availability.............................5 1.4 Citation...............................5 1.5 Help.................................5 1.6 Modular structure..........................5 1.7 Registration.............................6 1.8 Upgrades..............................6 1.9 Algebra...............................6 1.10 Batch................................7 1.11 Data storage.............................7 1.12 Filenames and extensions......................7 1.13 Output storage...........................8 1.14 Sample periods...........................8 1.15 Status bar..............................8 1.16 Tool bars..............................9 1.17 Documentation conventions.................... 10 2 Getting Started: Windows 11 2.1 Starting OxMetrics......................... 12 2.2 Registering OxMetrics....................... 12 v vi CONTENTS 2.3 Loading and viewing the tutorial data set............. 13 2.4 OxMetrics graphics......................... 16 2.4.1 A first graph........................ 16 2.4.2 Multiple graphs...................... 19 2.4.3 Graph saving and printing................ 21 2.4.4 Using the clipboard for graph pasting.......... 21 2.5 Calculator.............................. 22 2.6 Algebra............................... 24 2.7 The workspace........................... 25 3 Getting Started: OS X 28 3.1 Starting OxMetrics......................... 29 3.2 Registering OxMetrics....................... 30 3.3 Loading and viewing the tutorial data set............. 30 3.4 OxMetrics graphics......................... 34 3.4.1 A first graph........................ 34 3.4.2 Multiple graphs...................... 36 3.4.3 Graph saving and printing................ 38 3.4.4 Using the clipboard for graph pasting.......... 38 3.5 Calculator.............................. 39 3.6 Algebra............................... 41 3.7 The workspace........................... 43 4 Getting Started: Linux 45 4.1 Starting OxMetrics......................... 46 4.2 Registering OxMetrics....................... 47 4.3 Loading and viewing the tutorial data set............. 47 4.4 OxMetrics graphics......................... 51 4.4.1 A first graph........................ 51 4.4.2 Multiple graphs...................... 55 4.4.3 Graph saving and printing................ 56 4.4.4 Using the clipboard for graph pasting.......... 57 4.5 Calculator.............................. 57 4.6 Algebra............................... 60 4.7 The workspace........................... 62 5 OxMetrics Modules 64 5.1 OxMetrics Modules......................... 64 5.2 Financial data............................ 64 5.3 Weekly and daily data....................... 67 5.4 PcGive............................... 68 5.4.1 Formulate a model.................... 69 5.5 TSP................................. 73 5.5.1 TSP in interactive mode.................. 73 CONTENTS vii 5.5.2 TSP Help......................... 75 5.5.3 TSP in batch mode.................... 76 5.5.4 Explorer options...................... 76 6 Tutorial on Graphics 79 6.1 Descriptive graphics........................ 79 6.2 Actual series with optional transformations............ 82 6.3 Multiple series with optional transformations........... 84 6.4 Scatter plots............................. 84 6.5 Distribution............................. 87 6.5.1 Density estimation: Histogram and density........ 87 6.5.2 Distribution........................ 87 6.5.3 Frequencies........................ 89 6.5.4 Box plot.......................... 89 6.6 Time-series: ACF etc........................ 90 6.6.1 Autocorrelation function or correlogram......... 90 6.6.2 Partial autocorrelation function (PACF)......... 91 6.6.3 Cross-correlation function................ 91 6.6.4 Spectrum and periodogram................ 91 6.7 QQ plots.............................. 92 6.8 Two series by a third........................ 94 6.9 3-dimensional plots......................... 96 6.9.1 Surface from scatter.................... 96 6.9.2 Surface from table..................... 98 6.10 Conclusions............................. 99 7 Tutorial on Graph Editing 100 7.1 Multiple graphs........................... 100 7.2 Graphics paper: areas and coordinates............... 100 7.3 Graphics view............................ 102 7.4 New Data Plot Window....................... 102 7.5 Copy and paste........................... 102 7.6 About line colour and style..................... 103 7.7 Editing graphs: Graphics properties................ 103 7.8 Graphics setup........................... 107 7.9 Adding to and removing from a graph............... 108 7.10 Drawing............................... 109 7.11 Adding text and variables...................... 110 7.12 Legends............................... 110 7.13 Scaling variables.......................... 111 viii CONTENTS 8 Tutorial on Data Input and Output 113 8.1 Open Data File and file types.................... 114 8.2 From paper to OxMetrics...................... 114 8.2.1 Directly into the database................. 114 8.2.2 Using the clipboard; using OxMetrics as editor..... 117 8.3 From OxMetrics to disk...................... 119 8.4 From disk to OxMetrics...................... 119 8.4.1 Loading OxMetrics files................. 119 8.4.2 Loading spreadsheet files................. 119 8.4.3 Loading a human-readable (text) file........... 120 8.5 Adding variables using the clipboard................ 120 8.6 Changing the sample period.................... 121 8.6.1 Extending the sample period............... 121 8.6.2 Reset starting date..................... 121 8.7 Appending data........................... 121 8.8 Working with daily and weekly data................ 122 8.8.1 Using Change Sample to create a daily database..... 123 8.8.2 Using Algebra to create a daily database......... 124 8.9 Working with choice variables................... 125 9 Tutorial on Data Transformation 128 9.1 Calculator.............................. 128 9.2 Advanced algebra.......................... 130 9.2.1 Introduction........................ 130 9.2.2 Database for advanced algebra.............. 130 9.2.3 Statistical distributions.................. 130 9.2.4 Random number generators................ 133 9.2.5 Generating data...................... 135 9.2.6 Smoothing data...................... 137 10 OxMetrics Statistics 141 10.1 Actual series and scatter plots................... 141 10.2 Mean, standard deviation and variance............... 141 10.3 Autocorrelation function (ACF) or covariogram.......... 142 10.4 Partial autocorrelation function (PACF).............. 142 10.5 Correlogram............................ 142 10.6 Cross-correlation function (CCF)................. 143 10.7 Periodogram............................ 143 10.8 Spectral density........................... 144 10.9 Histogram, estimated density and distribution........... 144 10.10 Regression lines and smooths................... 145 10.10.1 Kernel smooth....................... 146 10.10.2 Spline smooth....................... 147 10.11 QQ plot............................... 148 CONTENTS ix 10.12 Box plot............................... 149 10.13 Exponentially-weighted moving average (EWMA)........ 149 10.14 Exponentially-weighted moving correlation............ 149 11 OxMetrics file formats 151 11.1 OxMetrics data files (.in7/.bn7)................. 151 11.1.1 The .in7 file format................... 151 11.1.2 The .bn7 file format................... 153 11.1.3 Limitations........................ 154 11.1.4 The information