Code Monkey home page Code Monkey logo

econometrics's Introduction

testing (testing is done on latest stable release of Julia, for Linux, Windows, and MacOS)

Econometrics

First year graduate level econometrics notes with embedded examples using the Julia language.

The notes cover linear regression models in the first half (about 30 hours of class time). The second half (another 30-40 hours of class time) moves on to nonlinear optimization, maximum likelihood and GMM estimation of potentially nonlinear models. After these core methods, there are several chapters which introduce more specialized topics such as panel data, quantile regression, nonparametric methods, etc.

The notes are in the file econometrics.pdf. It is not recommended to use this file by itself, as one will not have access to the linked code and examples. The notes were prepared with the expectation that the example code will be examined, run, and experimented with. See below for how to make full use of the materials.

To make full use of the notes and examples

How to videos (ctrl-click for new tab)

The playlist with all videos

The basic introductory videos:

  1. Introduction: short description of what's here
  2. Installation: how to install this as a Julia project
  3. Speed: how to compile a system image to make it fast
  4. Comfort: how to set up VS Code for comfortable use

Practical summary videos:

  1. Ch. 12, Numerical Optimization: explains how to use the practical summaries, and does the summary for Ch. 12.

Old School Instructions:

You need to install this repository as a Julia project. Do this as follows:

  1. download the code: (a) download a zip of the repo, and uncompress it in a convenient directory, or (b) git clone the repository to the desired location

  2. Go to that directory and start Julia using julia --proj

  3. In Julia, the first time you use the files, do using Pkg; Pkg.instantiate() This will take some time, as Econometrics relies on a number of other packages.

  4. then do using Econometrics in Julia to use the package. The first time you do this, it will take a long time, maybe 15 minutes or so. Don't worry, this is normal. All of the packages that were downloaded are being compiled for the first time. We will be able to make this go much, much faster when we want to use the code.

  5. To run examples, cd into the relevant subdirectory of Econometrics/Examples, and then just include the script you would like to run.

  6. Once this is done, you can use the code at any time by repeating steps 2 and 4.

  7. You can see some examples by typing

    ols()
    mleresults()
    gmmresults()
    mcmc()
    npreg()
    samin()

    when in Julia.

  8. To run examples, cd into the relevant subdirectory of Econometrics/Examples, and then just include the script you would like to run.

  9. I recommend setting your operating system to open .jl files with your favorite editor, to make the links in econometrics.pdf open in that editor.

  10. To speed things up a lot, type ìnclude("MakeSysimage.jl") from Julia, having started Julia with julia --proj in the directory where you installed the notes. This will compile all of the packages, and keep the compiled images for re-use. If you do this, when you start Julia in the future, use julia --proj -J JuliaSysimage.so (caveat: I have only tried this using Linux. If you're a Windows or OSX user, please open an issue if these instructions don't work)

There are a couple of unusual thing about these notes:

  • they are available in editable form (econometrics.lyx), so that you can modify them to suit your needs: see the first chapter for more information, and get LyX from www.lyx.org.
  • they contain links that point to example programs using the Julia language. The examples show how to use the methods and illustrate properties of estimators. The example code can be modified to allow exploration.

To get an idea of how this works, the following figure, on the R, shows an explanation in the pdf version of the notes, with a link to an example. The code of the example is visible in the upper L, and the output of running the example in Julia is at the lower L. The plot appears in the VScode plot frame.

example

econometrics's People

Contributors

mcreel avatar scottkosty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

econometrics's Issues

Having trouble with installation

I followed the installation instructions but then when I ran using Econometrics, it said it was precompiling the package and then it did not finish doing so for 5 minutes at which point I assumed it was not working.

Here is a screenshot that shows the output from the last step of the installation:

image

And here is a screenshot that shows the result of running the test you provide:
image

Any suggestions? Thanks!

DSGE example

Without going to MATLAB, the various estimation methods can be investigated directly with the current version of DSGE in Julia: https://github.com/FRBNY-DSGE/DSGE.jl .

The latest master does not test cleanly yet with Julia 1.+ but they say in the README that this is imminent!

Benchmarking between MATLAB and Julia can take place for some estimation methods.

Precompiling of Econometrics fails

Trying to test this interesting new package.

using Econometrics

Info: Precompiling Econometrics [4d6a76a9-bfbc-5492-8924-cf6ed7875f06]
└ @ Base loading.jl:1242
┌ Warning: Package StatsModels does not have Compat in its dependencies:
│ - If you have StatsModels checked out for development and have
│ added Compat as a dependency but haven't updated your primary
│ environment's manifest file, try Pkg.resolve().
│ - Otherwise you may need to report an issue with StatsModels
└ Loading Compat into StatsModels from project dependency, future warnings for StatsModels are suppressed.
ERROR: LoadError: LoadError: UndefVarError: FormulaTerm not defined
Stacktrace:
[1] top-level scope at C:\Users\Denis\Documents\Finmod\econometrics-master\src\LinearRegression\ols.jl:34
[2] include at .\boot.jl:328 [inlined]
[3] include_relative(::Module, ::String) at .\loading.jl:1094
[4] include at .\Base.jl:31 [inlined]
[5] include(::String) at C:\Users\Denis\Documents\Finmod\econometrics-master\src\Econometrics.jl:1
[6] top-level scope at C:\Users\Denis\Documents\Finmod\econometrics-master\src\Econometrics.jl:25
[7] include at .\boot.jl:328 [inlined]
[8] include_relative(::Module, ::String) at .\loading.jl:1094
[9] include(::Module, ::String) at .\Base.jl:31
[10] top-level scope at none:2
[11] eval at .\boot.jl:330 [inlined]
[12] eval(::Expr) at .\client.jl:432
[13] top-level scope at .\none:3
in expression starting at C:\Users\Denis\Documents\Finmod\econometrics-master\src\LinearRegression\ols.jl:34
in expression starting at C:\Users\Denis\Documents\Finmod\econometrics-master\src\Econometrics.jl:25

Failed to precompile Econometrics [4d6a76a9-bfbc-5492-8924-cf6ed7875f06] to C:\Users\Denis.julia\compiled\v1.2\Econometrics\XQPLt.ji.

Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1253
[3] _require(::Base.PkgId) at .\loading.jl:1013
[4] require(::Base.PkgId) at .\loading.jl:911
[5] require(::Module, ::Symbol) at .\loading.jl:906
[6] top-level scope at In[2]:1

Also it should also be possible to check if Econometrics.jl is correctly installed by doing pkg> test Econometrics but this is also not possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.