Pages

Tuesday, October 29, 2013

swirl: Learning Statistics & R

Most of us would acknowledge that getting up to speed with R involves a pretty steep learning curve - but it's worth every drop of sweat we shed in the process!

If you're learning basic statistics/econometrics, and learning R at the same time, then the challenge is two-fold. So, anything that will make this feasible (easy?) for students and instructors alike deserves to be taken very seriously.

Enter swirl - "statistics with interactive R learning" - developed at the Department of Biostatistics, Johns Hopkins University.  It's dead easy to download and install swirl - it just takes a few moments, and you're underway.

There are simple, interactive, lessons that introduce you to the essential concepts, and you have the option to watch related videos. If you need to take a break part way through a lesson then you can save what you've completed, and pick up from that point at a later time.

My guess is that students will find swirl appealing and very helpful.


© 2013, David E. Giles

Sunday, October 27, 2013

The Joys of Publishing!

I owe a VERY BIG hat-tip to Arthur Charpentier (he of the Freakonometrics blog) for alerting me to this one!

Getting your work published can pose interesting challenges at the best of times. But what about at the worst of times? 

Rick Trebino, of the School of Physics at Georgia Tech., tells us "How to Publish a Scientific Comment in 1 2 3 Easy Steps". I just love it!

Here's how Rick's story begins:

The Future of Statistical Sciences Workshop

No doubt you know, already, that 2013 has been the International Year of Statistics. To that end, there's been a veritable smorgasbord of activities and events promoting the discipline, and the contributions of statisticians far and wide.

The capstone event for Statistics2013 is "The Future of Statistical Sciences Workshop", to be held in London (England) on 11 and 12 November.

This workshop
"...will showcase the breadth and importance of statistics and highlight the extraordinary opportunities for statistical research in the coming decade.
This invitation-only workshop will be an opportunity for presenters, all statisticians and organizers to think about where statistics should go as a discipline and the lessons learned in the past that will guide us into the future. During this unique event, statistical scientists and scientists from other disciplines will interact and chart a shared vision for the future."
There are some great speakers lined up for this two-day event, and although the workshop is invitation-only, you can register now for the associated webinar.

And don't forget The Unconference on the Future of Statistics!
© 2013, David E. Giles

Saturday, October 26, 2013

Segmented Regression - Some (Relatively) Early References

In response to a recent post of mine on "segmented regression", an anonymous reader asked if I knew when such regressions first appeared in the literature. I'm not sure of the very first reference, but there was certainly an active literature on this by the mid 1960's.

One good reference is V. E. McGee and W. T. Carleton (1970), "Piecewise Regression", Journal of the American Statistical Association, 65, 1109-1124. Those authors cite the following other material, which includes several earlier papers on this topic:

Hopefully, this is helpful.


© 2013, David E. Giles

Friday, October 25, 2013

Chris Sims on Bayesianism

I just love this piece by Chris Sims: "Bayesian Methods in Applied Econometrics, or, Why Econometrics Should Always and Everywhere Be Bayesian", from 2007.

In addition to the solid content, there are some great take-away snippets, such as:

  • "Bayesian inference is hard in the sense that thinking is hard."
  • "(People) want to characterize uncertainty about parameter values, given the sample that has actually been observed."
  • "Good frequentist practice has a Bayesian interpretation."

  • And Sims' conclusion: "Lose your inhibitions: Put probabilities on parameters without embarrassment."

    I can live with that!

    © 2013, David E. Giles

    Tuesday, October 22, 2013

    Solution to the Segmented Regression Problem

    Here's my solution to the "segmented regression" problem that I posed yesterday. Thanks for the comments and suggestions!

    You'll recall that what we wanted to do was to end up with a fitted least squares "line" looking like this:

    In particular, the "kink" in the line is at a pre-determined point - in this example when x = 30.

    Here's how we can achieve this:

    Money 101: Top Resources for Finance Majors



    Abigail Moore, the Content Creator at OnlineFinanceDegree.org, emailed me today:

    "I'm writing with the exciting news that our latest article, "Money 101: Top Resources for Finance Majors," has been published, and Econometrics Beat: Dave Giles' Blog is cited on it.
    Finance is an engaging and highly competitive professional field to get into. For those studying finance, the internet can offer a wealth of resources. That said, it can be hard to sift through and find the best. We hope this feature will help finance students find information about financial organizations, current economic news, financial modeling software and techniques, and the finance industry as a whole. Your site is a valuable addition to this resource.
    We're hoping to share this article with as many finance students and professionals as possible and will be contacting our readers and followers. If you're able to post this on your website or share the article anywhere else you can think of too, I'd really appreciate it." 
    No problem, Abigail - happy to oblige. You'll find this blog listed as site #8.



    © 2013, David E. Giles

    Monday, October 21, 2013

    Lawrence R. Klein, 1920-2013

    One of the great figures of econometrics passed away yesterday. Lawrence Klein was the father of whole-economy macroeconometric modelling, and his massive contributions to this field earned him the Nobel Prize in 1980.

    Klein created some of the earliest simultaneous equations models of the U.S. economy (e.g., see here), and he was the driving force behind countless such models for other economies around the world. Among other things, Klein was responsible for the foundation of Project LINKin 1968. This ambitious endeavour now brings together econometric models for 78 countries to provide a "world econometric model".

    Lawrence Klein shaped econometric modelling, and his passing marks the end of an amazing era.

    Businessweek's obituary for Lawrence Klein can be found here.


    © 2013, David E. Giles

    A "Segmented" Regression Problem

    Here's a little exercise for the students among you.

    Suppose that we want to fit a least squares regression model that allows for a "break" in the underlying relationship at a particular sample value for the regressor(s). In addition, we want to make sure that the fitted model passes through that sample value.

    In other words, we want to end up with a fitted model that gives a result such as this:

    Here, the two segments of the regression line "join" when X=30. What's a simple way to achieve this?



    © 2013, David E. Giles

    Monday, October 14, 2013

    Economics Nobel Prize, 2013

    The waiting is over - the 2013 Nobel in Economics was announced this morning! Most deservedly, it has been awarded to Eugene F. Fama (U. Chicago), Lars Peter Hansen (U. Chicago), and Robert J. Shiller (Yale U.). The citation says: "For their empirical analysis of asset prices". 

    For more details, see here.

    It's really  nice to see the recognition of empirical research.

    And let's not forget that Hansen gave us GMM estimation; and do you recall Shiller distributed lag models?


    © 2013, David E. Giles

    Saturday, October 12, 2013

    Project-Based Learning of Modern Econometrics

    The U.K.  Economics Network is supported by, and housed at, the University of Bristol. It provides a wealth of resources for those teaching Economics.  These resources include material produced by various funded projects, including one by Steve Cook (Swansea University). His project (in 2010-11) was titled, "Project-Based Learning of Modern Econometrics. Here's Steve's overview:

    Friday, October 11, 2013

    Do Better Economic Models Lead to Better Forecasting?

    Earlier this month I had a post drawing attention to a short video by David Hendry. Here's another one - this time titled, "Do Better Economic Models Lead to Better Forecasting?


    © 2013, David E. Giles

    Thursday, October 10, 2013

    Seven Deadly Sins

    Xiao-Li Meng has an interesting piece in the September 2013 issue of the IMS Bulletin. (IMS = Institute of Mathematical Statistics). You'll find it on page 4, and it's titled "Rejection Pursuit".

    In short, it's about the author's repeated efforts, as a young researcher, to get a particular paper published. The story has a happy ending, and Xiao-Li leaves us with a list of "Seven Deadly Sins of Research Papers, and Seven Virtues to Cultivate":


    This looks like excellent advice, regardless of your discipline.

    And yes, the article does have an econometric connection. If you read the article and you're interested in non-stationary time-series, you'll probably see the connection coming before the author mentions it!


    © 2013, David E. Giles

    Beyond MSE - "Optimal" Linear Regression Estimation

    In a recent post I discussed the fact that there is no linear minimum MSE estimator for the coefficients of a linear regression model. Specifically, if you try to find one, you end up with an "estimator" that is non-operational, because it is itself a function of the unknown parameters of the model. It's note really an estimator at all, because it can't be computed.

    However, by changing the objective of the exercise slightly, a computable "optimal estimator" can be obtained. Let's take a look at this.

    Wednesday, October 9, 2013

    Blogs on Resources for Economists

    Nice to see that we're now listed on the list of Economics blogs on Resources for Economists.

    Thanks!


    © 2013, David E. Giles

    Tuesday, October 8, 2013

    So Much Good Reading........

    Here are my latest reading suggestions:
    • Choi, I., 2013. Panel Cointegration. Working Paper, Department of Economics, Sogang University, Korea.
    • Davidson, R. and J. G. MacKinnon, 2013. Bootstrap tests for overdentification in linear regression models. Economics Department Working Paper No. 1318, Queen's University.
    • Deng, A., 2013. Understanding spurious regression in financial econometrics. Journal of Financial Econometrics, in press.
    • Feng, C., H. Wang, Y. Han, and Y. Xia, 2013. The mean value theorem and Taylor's expansion in statistics. The American Statistician, in press.
    • Kiviet, J. F. and G. D. A. Phillips, 2013. Improved variance estimation of maximum likelihood estimation in stable first-order dynamic regression models. EGC Report No. 2012/06, Division of Economics, Nanyang Technical University.
    • Lanne, M., M. Meitz, and P. Saikkonen, 2013. Testing for linear and nonlinear predicatability of stock returns. Journal of Financial Econometrics, 11, 682-705.

    © 2013, David E. Giles

    The History of Statistics in the Classrom

    You've probably gathered already that I like to incorporate material relating to the history of econometrics, and the history of statistics, into my classroom material. I've always found that it adds perspective, and knowing something about the characters who've contributed to the development of the discipline brings the material to life.

    A few years ago, Herbert David presented a paper at the Joint Statistical Meetings, titled "The History of Statistics in the Classroom". It discusses three big players - Laplace, Gauss, and Fisher. You can download a copy of the paper here.


    © 2013, David E. Giles

    Monday, October 7, 2013

    A Second Lesson in Econometrics

    In an earlier post (here) I discussed John Siegfried's short piece titled "A First Lesson in Econometrics".

    A reader of this blog "veli y" has drawn my attention to a very important follow-up piece by Damien Eldridge, of La Trobe University in Australia. His paper, "A Comment on Siegfried's First L"esson in Econometrics can be seen here

    Thanks for the tip!


    © 2013, David E. Giles

    Society for Economic Measurement

    Hat-Tip to Michael Belongia for drawing my attention to the Society for Economic Measurement.

    Initiated by William Barnett, the Society will be holding its first conference next (Northern) summer.

    Definitely worth checking out!


    © 2013, David E. Giles

    A Regression "Estimator" that Minimizes MSE

    Let's talk about estimating the coefficients in a linear multiple regression model. We know from the Gauss-Markhov Theorem that, within the class of linear and unbiased estimators, the OLS estimator is most efficient. Because it is unbiased, it therefore has the smallest possible Mean Squared Error (MSE), within the linear and unbiased class of estimators.

    However, there are many linear estimators which, although biased, have a smaller MSE than the OLS estimator. You might then think of asking: “Why don’t I try and find the linear estimator that has the smallest possible MSE?”

    Sunday, October 6, 2013

    Contemporary Econometrics in Economic Education Research

    Under the auspices of the Council for Economic Education, and the American Economic Association, William Becker has developed of An Online Handbook for the Use of Contemporary Econometrics in Economic Education. Details can be found here.

    While some might find the choice of topics (to date) to be somewhat idiosyncratic, it's still a very nice resource.


    © 2013, David E. Giles

    Saturday, October 5, 2013

    The History of Statistical Terms

    Do you ever wonder where those expressions that we use in econometrics come from? You know - terms such as "regression", "autocorrelation", and so on.

    Most of them are, of course, borrowed from mathematical statistics. But when were they first used, and who first coined these names?

    Friday, October 4, 2013

    Peter Kennedy on "Getting the Wrong Sign"

    The late Peter Kennedy spent most of his career in the Department of Economics at Simon Fraser University. He was a well-liked "just across the water" academic neighbour of mine.

    Peter was an excellent and passionate teacher. He was adept at explaining econometrics to reluctant listeners! Several years ago, he gave a seminar in our department titled, "Oh No! I Got the Wrong Sign! What Should I Do?"

    The paper was later published in The Journal of Economic Education, 2005, 36(1), 77-92.

    If you haven't seen it before, I'm sure you'll enjoy it.


    © 2013, David E. Giles

    The Unconference

    Another item from the September issue of the International Year of Statistics Newsletter:
    'Nearly two weeks before the Future of the Statistical Sciences Workshop*, the Unconference on the Future of Statistics will be staged. Organized by two of the authors of the Simply Statistics blog, the Unconference will be a virtual event hosted on Google Hangouts. 
    “It is a great time to be a statistician and discussing the future of our discipline is of utmost importance to us,” say Roger Peng and Jeff Leek, Unconference organizers, referring to the Future of the Statistical Sciences Workshop. “In fact, we liked the idea so much we decided to get in the game ourselves. We are super excited to announce the first ever ‘Unconference’ hosted by Simply Statistics. Our goal is to compliment and continue the discussion inspired by the Statistics 2013 Workshop.” 
    The Unconference, which will focus on the future of statistics from the perspective of junior statisticians, will be held October 30 from noon to 1 p.m. EST on Google Hangouts and simultaneously live-streamed on YouTube
    The event will feature several of the most exciting and innovative statistical thinkers discussing their views on the future of the field, especially those issues that affect junior statisticians the most: education, new methods, software development, collaborations with natural sciences/social sciences, and the relationship between statistics and industry. 
    You can sign up for the Unconference here. During the lead-up to the conference, organizers ask that you submit your thoughts on the future of statistics via Twitter using the hashtag #futureofstats. They will compile all comments and make these available along with the talks.' 
    * The Future of Statistical Sciences Workshop is a capstone event for the International Year of Statistics, which will take place in London, England in November of this year. There'll be more on this in a post closer to that date.


    © 2013, David E. Giles

    Thursday, October 3, 2013

    Something to Tweet About

    From the September issue of the International Year of Statistics Newsletter:
    "The Fields Institute for Research in Mathematical Sciences at the University of Toronto is sponsoring a Twitter contest called “The Normal Curve”. The contest is being held in recognition of the Institute’s 20th anniversary and the International Year of Statistics. In this unique contest, the Institute poses this question to the world: “What would the world be like if the normal curve was not discovered?” To enter, tweet your answer to the question using the hashtag #WithoutTheCurve for a chance to win one of three autographed copies of Jeffrey Rosenthal’s bestselling book, Struck by Lightning. Submissions for The Normal Curve contest will be accepted beginning September 25 at 12:01a.m. EST. To be eligible for the contest, submissions must be submitted by Twitter, tagged as #WithoutTheCurve and address the contest question. The entry deadline is 11:59 p.m. EST October 15. The top entries selected by volunteers at the Fields Institute’s MathEd forum will be entered into a pool for the drawing the prizes. Winners will be randomly selected for the three prizes. Winners will be announced by the end of October. The contest is open to users internationally. Submissions not in English may be translated using Google Translate if there is no one on the judging panel who can translate the tweet."
    Time to start tweeting!

    © 2013, David E. Giles

    The 5th Lindau Meeting on Economic Sciences

    The Lindau Nobel Laureate Meetings have been held since 1951. They bring together Nobel Laureates and a group of hand-picked young researchers from around the world in Lindau, Germany.

    The 4th such meeting for Economic Sciences was held in 2011, and involved 17 Economics Nobel laureates and more than 350 young economists from 65 countries.

    The 5th Lindau Meeting on Economic Sciences will be held in August 2014:
    "The 5th Lindau Meeting on Economic Sciences will provide an open exchange of economic expertise and inspire cross-cultural and inter-generational encounters among economists from all over the world. The world economic and financial crisis will surely be a central theme between the laureates and the young participants, but most likely the global central banking system or the challenges to the international free trade will also be main topics."
    Perhaps you know someone who deserves to be nominated to participate in this Meeting?


    © 2013, David E. Giles

    Wednesday, October 2, 2013

    The True Title of Bayes's Essay

    As someone whose Ph.D. dissertation was in the area of Bayesian Econometrics, I was fascinated to read this recent paper by Stephen Stigler: "The True Title of Bayes's Essay". It appeared this month in Statistical Science, 2013, vol. 28(3), 283-288.

    The abstract of the paper is succinct, but very clear:
    "New evidence is presented that Richard Price gave Thomas Bayes's famous essay a very different title from the commonly reported one. It is argued that this implies Price almost surely and Bayes not improbably embarked upon this work seeking a defensive tool to combat David Hume on an issue in theology."
    So, it wasn't just intended to provide a painful experience for those being introduced to probability theory for the first time, after all!

    October Means Nobel Prizes

    Yes, it's almost that time of year again!  The recipient(s) of the 2013 Nobel Prize in Economic Sciences (abbreviated title) will be announced in less than two weeks' time - Monday 14 October, to be precise.

    Thomson Reuters have made their predictions for the likely recipients in each field, including Economics.

    I particularly like one of their three potential "winning teams":

    "Sir David F. Hendry
    Professor of Economics
    University of Oxford
    Oxford, England, UK

    -and-

    M. Hashem Pesaran
    John Elliot Distinguished Chair in Economics & Professor of Economics, and Emeritus Professor of Economics & Fellow of Trinity College, Cambridge
    University of Southern California, Los Angeles, CA, USA 
    and University of Cambridge, Cambridge, England, UK

    -and-

    Peter C.B. Phillips
    Sterling Professor of Economics and Professor of Statistics
    Yale University
    New Haven, CT, USA

    For their contributions to economic time-series, including modeling, testing and forecasting."


    © 2013, David E. Giles

    In What Sense is the "Adjusted" R-Squared Unbiased?

    In a post yesterday, I showed that the usual coefficient of determination (R2) is an upward -biased estimator of the "population R2", in the following sense. If there is really no linear relationship between y and the (non-constant) regressors in a linear multiple regression model, then E[R2] > 0. However, both E[R2] and Var.[R2] → 0 as n → ∞. So, R2 is a consistent estimator of the (zero-valued) population R2.

    At the end of that post I posed the following questions:
    "You might ask yourself, what emerges if we go through a similar analysis using the "adjusted" coefficient of determination? Is the "adjusted R2" more or less biased than R2 itself, when there is actually no linear relationship between y and the columns of X?"
    Here's the answer.......

    Tuesday, October 1, 2013

    Can Economists Forecast Crashes?

    Without a doubt, Professor Sir David Hendry (University of Oxford) is one of the giants of econometrics. He's a wonderful speaker and champion of our profession, as you can see in this video, titled "Can Economists Forecast Crashes?"

    Enjoy!

    © 2013, David E. Giles

    More on the Distribution of R-Squared

    Some time ago, I had a post that discussed the fact that the usual coefficient of determination (R2) for a linear regression model is a sample statistic, and as such it has its own sampling distribution. Some of the characteristics of that sampling distribution were discussed in that earlier post.

    You probably know already that we can manipulate the formula for calculating R2, to show that it can be expressed as a simple function of the usual F-statistic that we use to test if all of the slope coefficients in the regression model are zero. This being the case, there are some interesting things that we can say about the behaviour of R2, as a random variable, when the null hypothesis associated with that F-test is in fact true.

    Let's explore this a little.