Example: tourism industry

Applied Financial Econometrics using Stata 1. …

Applied Financial Econometrics using Stata1. Introduction to Stata (& Reproducible Research)Stan HurnQueensland University of Technology& National Centre for Econometric ResearchHurn (NCER) Applied Financial Econometrics using Stata1 / 421 Introduction2 Some Stata Commands3 Programming Fundamentals4 Reporting Results5 Estimation Commands6 MataHurn (NCER) Applied Financial Econometrics using Stata2 / 42 IntroductionHousekeepingStan course of lectures will feature Stata 13. to licensing issues, you are not able to accessStata during the lectures, but all the materials toreproduce the results reported during the course areavailable (NCER) Applied Financial Econometrics using Stata3 / 42 IntroductionStataStata is a reasonably fast, powerful statistical package withsmart data-management facilities,a wide array of up-to-date statistical techniques,a

Applied Financial Econometrics using Stata 1. Introduction to Stata (& Reproducible Research) Stan Hurn Queensland University of Technology & National Centre for Econometric Research

Tags:

  Using, Applied, Financial, Econometrics, Stata, Applied financial econometrics using stata

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Applied Financial Econometrics using Stata 1. …

1 Applied Financial Econometrics using Stata1. Introduction to Stata (& Reproducible Research)Stan HurnQueensland University of Technology& National Centre for Econometric ResearchHurn (NCER) Applied Financial Econometrics using Stata1 / 421 Introduction2 Some Stata Commands3 Programming Fundamentals4 Reporting Results5 Estimation Commands6 MataHurn (NCER) Applied Financial Econometrics using Stata2 / 42 IntroductionHousekeepingStan course of lectures will feature Stata 13. to licensing issues, you are not able to accessStata during the lectures, but all the materials toreproduce the results reported during the course areavailable (NCER)

2 Applied Financial Econometrics using Stata3 / 42 IntroductionStataStata is a reasonably fast, powerful statistical package withsmart data-management facilities,a wide array of up-to-date statistical techniques,and an excellent system for producing publication-quality graphicsa large group of users with plenty of lively exchange on the weba built in matrix programming language calledMataThe bad news is that Stata is fairly expensive and there is a startup cost inlearning to use it (or at least there is for me!)Hurn (NCER) Applied Financial Econometrics using Stata4 / 42 IntroductionWhich EditionThere are a number of different editions of Stata : Stata /MP: The fastest version of Stata (for dual-core andmulticore/multiprocessor computers) Stata /SE: Stata for large datasetsStata/IC: Stata for moderate-sized datasetsSmall Stata : A version of Stata that handles small datasets (forstudents only)Hurn (NCER) Applied Financial Econometrics using Stata5 / 42 IntroductionReferencesThere are a few excellent texts for learning F.

3 BaumAn Introduction to Stata Programming, Station, TX: Stata F. BaumAn Introduction to Modern Econometrics UsingStata, 2006. College Station, TX: Stata Cameron and Pravin TrivediMicroeconometrics using Stata (Revised Edition), 2010. College Station, TX: Stata N. MitchellA Visual Guide to Stata Graphics (ThirdEdition), 2012. College Station, TX: Stata (NCER) Applied Financial Econometrics using Stata6 / 42 IntroductionStata Front End for MacHurn (NCER) Applied Financial Econometrics using Stata7 / 42 IntroductionExtending StataA feature of Stata is that it is continually being expanded.

4 A command, toStata, is an instruction to perform some action. Commands may be either: built in commands (those elements so frequently used that theyhave been coded into the Stata kernel); orwritten in Stata s own programming language using an .ado importance of this program design goes far beyond the limits ofofficial Stata as you are able to acquire new Stata commands from anumber of (NCER) Applied Financial Econometrics using Stata8 / 42 IntroductionUpdate FaciityBuilt-in commands change fairly frequently and are distributed as bugfixes, enhancements to existing commands and even entirely newcommands during the lifetime of a given major release.

5 One of Stata sgreat strengths is that it can be updated over the the commandupdate allfrom the command line will checkfor more recent versions of either Stata s executable (the kernel) orthe from theMenuyou clickHelp - Check for updatesAll that is required to update Stata therefore is that you have a licensedcopy of Stata and access to the (NCER) Applied Financial Econometrics using Stata9 / 42 IntroductionBeyond Official StataThere are two particularly important websitesThe Stata Journal (SJ), a quarterly refereed journal, is the primarymethod for distributing user contributions.

6 The Stata commandfinditwill locate commands that have been documented in the SJand with one click you may install them in your version of Boston College Boston Statistical Software Components (SSC)Archive contains all new general-purpose commands written byindividuals to extend Stata newlists new packagesssc hotreports on the most popular packagesadoupdate, updateupdates your installed the commandsearchplus a few keywords will present results froma keyword database and from the Internet: for instance, FAQs from theStata website, articles in the Stata Journal and Stata Technical Bulletin,and downloadable routines from the SSC Archive and user (NCER) Applied Financial Econometrics using Stata10 / 42 IntroductionSetting up a ProjectI like having the following directory can move between folders like this.

7 /../folder moves back two directories ../folder moves back one directory ./folder accesses a subfolder of the current directoryRemember to assign theworking directorywhen you start a (NCER) Applied Financial Econometrics using Stata11 / 42 IntroductionWorking DirectoryThe foot of the Stata screen contains an important piece ofinformation: the Current Working Directory, or cwd is the directory to which any files created in your Statasession will be saved. Likewise, if you try to open a file and give itsname alone, it is assumed to reside in the the file is in another location, you must change the cwd either usingthe menusFile - Change Working Directory.

8 Or issue a command in the do filecd ~/Dropbox/Teaching/Singapore/doHurn (NCER) Applied Financial Econometrics using Stata12 / 42 IntroductionFile ExtensionsFile extensions usually employed (but not required) include:.ado automatic do-file (defines a Stata command).dct data dictionary, optionally used with do-file (user program).dta Stata binary graphics output file (binary).log text log SMCL (markup) log file, for use with ASCII data Stata help fileThese extensions need not be given (except for .ado). If you use otherextensions, they must be explicitly (NCER) Applied Financial Econometrics using Stata13 / 42 IntroductionThe Log FileFor reproducible research it is worthwhile behaving like a benchscientist and keeping a lab notebook the Stata log file plays log file is a record of the Results window.

9 It records all commandsand all textual output as it file is written to disk and protects against power failures orcomputer can save the file in one of two different Markup and Control Language (SMCL) format the files can be translated into a variety of formats readable byapplications other than Stata .Hurn (NCER) Applied Financial Econometrics using Stata14 / 42 Some Stata CommandsStata Command SyntaxStata command syntax follows strict fundamental syntax of all Stata commands follows a all elements of the template are used by all commands, and someelements are only valid for certain commands.

10 But where an elementappears, it will appear in the same place, following the same is case sensitive. Commands must be in lower general syntax of a Stata command is:[prefix_cmd:] cmdname [varlist] [=exp] [if exp][in range] [weight] [ ][,options]where elements in square brackets are optional for some (NCER) Applied Financial Econometrics using Stata15 / 42 Some Stata CommandsPrefix CommandsA number of Stata commands can be used as prefix commands, precedinga Stata command and modifying its :repeats a command over a set of categoriesstatsby:repeats the command and collects statistics from each :runs the command on moving subsets of the data (usually timeseries).


Related search queries