# econometrics

### My Course Wish List at CMSE next year

August 30, 2012 |

Here is the list  of courses I wish to teach next year at Chiang Mai School of Economics, not so sure about the demand there! Undergraduate (B.Econ.) ECON 304: Economics Statistics (with R) ECON 408: Research Design in Economics ECON 417: Managerial Economics ECON 419: Economic Theory and Entrepreneurship ECON 443: Industrial Economics ECON 4... [Read more...]

### Visualization in regression analysis

February 23, 2012 |

Visualization is a key to success in regression analysis. This is one of the (many) reasons I am also suspicious when I read an article with a quantitative (econometric) analysis without any graph. Consider for instance the following dataset, obtai... [Read more...]

### On linear models with no constant and R2

February 2, 2012 |

In econometrics course we always say to our students that "if you fit a linear model with no constant, then you might have trouble. For instance, you might have a negative R-squared". So I tried to find databases on the internet such that, when we ... [Read more...]

### Regression via Gradient Descent in R

November 27, 2011 |

In a previous post I derived the least squares estimators using basic calculus, algebra, and arithmetic, and also showed how the same results can be achieved using the canned functions in SAS and R or via the matrix programming capabilities offered by ...

### Basic Econometrics in R and SAS

November 27, 2011 |

Regression Basicsy= b0 + b1 *X  ‘regression line we want to fit’The method of least squares minimizes the squared distance between the line ‘y’ andindividual data observations yi. That is minimize: ∑ ei2 = ∑ (yi - b0 -  b1 Xi...

### Modelling with R: part 2

October 2, 2011 |

I apologize for the delay in the second post (just in case anybody was waiting), I had been vary involved with work the past week. I shall try to be more regular. Well, in the previous post, we successfully imported data into R and got a basic "feel" o...

### Modelling with R: part 1

September 29, 2011 |

When I started work about 3 months ago, I didn't know much more than loading data and executing standard Econometric commands in R. But now I feel much much much more confident in using R for work, for research, for puzzles, and sometimes just for fun....

### Bayesian Models with Censored Data: A comparison of OLS, tobit and bayesian models

September 17, 2011 |

The following R code models a censored dependent variable (in this case academic aptitude) using a traditional least squares, tobit, and Bayesian approaches.  As depicted below, the OLS estimates (blue) for censored data are inconsistent and will ...

### Hey! I made you some Wiener processes!

September 7, 2011 |

Check them out. Here are thirty homoskedastic ones: __ homo.wiener for (j in 1:30) {  for (i in 2:length(homo.wiener)) {          homo.wiener[i,j] for (j in 1:30) {        plot( homo.wiener[,j],           type = "l", col = rgb(.1,.... [Read more...]

### "My interpretation of [Leland Wilkinson’s] grammar [of statistical graphics]: —Data is the most…"

August 25, 2011 |

“My interpretation of [Leland Wilkinson’s] grammar [of statistical graphics]: —Data is the most important thing, and the thing that you bring to the table. —Geometric objects … what you actually see on the plot: points, lines, polygons, etc. ... [Read more...]

### "My interpretation of [Leland Wilkinson’s] grammar [of statistical graphics]: —Data is the most…"

August 25, 2011 |

“My interpretation of [Leland Wilkinson’s] grammar [of statistical graphics]: —Data is the most important thing, and the thing that you bring to the table. —Geometric objects … what you actually see on the plot: points, lines, polygons, etc. ... [Read more...]

### Multivariate probit regression using (direct) maximum likelihood estimators

May 11, 2011 |

Consider a random pair of binary responses, i.e. with taking values 1 or 2. Assume that probability can be function of some covariates . The Gaussian vector latent structure A standard model is based a latent Gaussian structure, i.e. there exi... [Read more...]

### Copula Functions, R, and the Financial Crisis

March 10, 2011 |

From: In defense of the Gaussian copula, The Economist"The Gaussian copula provided a convenient way to describe a relationship that held under particular conditions. But it was fed data that reflected a period when housing prices were not correlated to the extent that they turned out to be when ...

### Stationarity

February 9, 2011 |

In time series work you often run into difficulties in modeling processes where the overall level of one variable (an input, for example) changes over time but the levels of another variable (an output) do not change. For instance if … Continue reading →

### cumsum ( rnorm(50), lend="butt", lwd=12, type="h" ) Cumulative…

December 8, 2010 |

cumsum ( rnorm(50), lend="butt", lwd=12, type="h" ) Cumulative sum of 50 draws from a normal distribution. File this under mysteries of the Central Limit Theorem. [Read more...]

### Central Limit Theorem A nice illustration of the Central Limit…

October 20, 2010 |

Central Limit Theorem A nice illustration of the Central Limit Theorem by convolution.in R: Heaviside 0,1,0) }HH [Read more...]

### Here is how to improve your charts, graphs, maps, and…

October 2, 2010 |

Here is how to improve your charts, graphs, maps, and plots: Erase non-data ink. Erase redundant data ink. Maximize the ratio of data to ink. Show data variation, not design variation. The surface area of graphical elements should be directly proportio... [Read more...]

### extrapolation and interpolation The most important lesson I…

May 25, 2010 |

extrapolation and interpolation The most important lesson I learned from this book:  regression is reliable for interpolation, but not for extrapolation.  Even further, your observations really need to cover the whole gamut of causal variables, inter... [Read more...]