I couldn’t find anything online to directly convert old Irish prices to current values. So I wrote some code to estimate e.g. £100 in 1950 in 2012 prices.
It’s here: http://www.hargaden.com/enda/inflation/calculator.html
I couldn’t find anything online to directly convert old Irish prices to current values. So I wrote some code to estimate e.g. £100 in 1950 in 2012 prices.
It’s here: http://www.hargaden.com/enda/inflation/calculator.html
This is incredibly simple code but may be of use to some people. Typing out derivatives in LaTeX (e.g. \(\frac{\partial y}{\partial x}\)) can be shortened.
Add this line of code to the header of your document:
[code]
\newcommand{\dydx}[2]{\frac{\partial{#1}}{\partial{#2}}}
[/code]
This creates a new command \dydx that takes two arguments, e.g. \dydx{P}{\tau}. Include this command in math mode (e.g. encased in dollar signs) and it will produce \(\frac{\partial P}{\partial \tau}\).
If emigration had been included in the Olympics when they were first introduced, Ireland would be a great sporting nation. Nonetheless the scale of the emigration is sometimes slightly exaggerated.
I have seen it stated online that “Four out of every five children born in Ireland between 1931 and 1941 emigrated in the 1950s.” (For example, here and here.) This is not true.
The claim first appears on p.379 of JJ Lee (1989) Ireland, 1921-1985: Politics and Society. This is an excellent book, but the claim is slightly incorrect. Lee attributes the claim to Tobin (1984:156) The Best of Decades. I tracked this book down on eBay. Tobin in turn was citing Garret FitzGerald, who wrote in the Irish Times in September 1966 that “[Current low unemployment] contrasts sharply with the position between 1954 and 1961 when net emigration averaged over 45,000 a year, or the equivalent of 80 per cent of those born eighteen or twenty years earlier.”
FitzGerald notes that the emigration rate is “the equivalent” of 80% of those born twenty years earlier. This definition could include, for example, two thirty year-olds and their three small children. In that respect the original 80% statistic is stated too strongly: restricting emigration exclusively to those born between 1931 and 1941 invalidates the claim. We know that many of the emigrants of the 1950s were young children.
In summary, the statement that four out of every five children born in Ireland between 1931 and 1941 emigrated in the 1950s is incorrect. What is true is that around 57,000 were born each year in the 1930s, and around 45,000 people (i.e. about 80% of 57,000) emigrated each year in the 1950s. The starkness of that statistic doesn’t require any exaggeration.
Students ask me this all the time, so here’s my explanation of the three types of inefficiency.
1. Productive inefficiency. This is a supply-side idea. Mattie and Joe both produce bananas. The bananas are identical. It cost Mattie $12 to produce his last kilogram of bananas, and it cost Joe $10 to produce his last kilogram. They would both better off if, instead of producing that last unit for $12, Mattie paid Joe e.g. $11.50 to produce it. That way Mattie saves 50c and Joe makes a profit of $1.50.
The condition needed to satisfy productive efficiency is that the marginal cost for Company A equals the marginal cost for Company B. If the marginal costs differ, then there are gains from trade from the low marginal cost company (e.g. Joe) selling the item to the company with the high marginal cost (e.g. Mattie).
2. Distributive inefficiency. This is a consumer-side idea. Let’s say that for some reason bananas sell for $1 in the US and $3 in Canada. Then there are people in Canada who are willing to pay, say, $2.75 for bananas but do not receive them. Suppose some American is willing to pay up to (but no more than) $1.20 for bananas. If he sells the bananas to the Canadian for e.g. $2.50, then everyone is better off. Although the American was receiving 20c in consumer surplus by purchasing the bananas for $1, he is clearly better off by selling them for $2.50. (Obviously transport costs have to be small for this to hold.) The Canadian gets the bananas and 25c consumber surplus, so he is also better off. Therefore the $1 and $3 prices generate inefficiencies.
The condition needed to satisfy distributive efficiency is that the marginal benefit to Mr 1 equals the marginal benefit to Mr 2. If they differ, then there are gains from trade from the person with the low MB (e.g. $1) selling the item to the person with the high MB (e.g. $3).
3. Allocative inefficiency. This puts the consumer-side and the producer-side together. Suppose everything regarding productive efficiency (marginal costs for Company A and Company B are the same) and distributive efficiency (marginal benefits for Mr 1 and Mr 2 are the same) is just fine. You can still have inefficiency if the marginal benefits don’t equal the marginal costs. For example, if the costs of the last kg of bananas is $10 but consumers are only willing to pay $3 for it, then producing that last unit is inefficiently costly.
Thus the condition needed to satisfy allocative efficiency is that the marginal benefits (consumer side) equal the marginal costs (producer side).
These are external functions to calculate skewness and kurtosis for a vector in R. Anyone using R is likely able to write similar functions themselves, but you never know.
[code]
### sample_skew.R
### Enda Hargaden, January 2013
sample_skew = function(data_vec_dirty)
{
# Remove missing values
data_vec = data_vec_dirty[!is.na(data_vec_dirty)]
n = length(data_vec)
xbar = mean(data_vec)
second_moment = c()
third_moment = c()
for(i in 1:n)
{
second_moment[i] = (data_vec[i] – xbar) ^ 2
third_moment[i] = (data_vec[i] – xbar) ^ 3
}
s_numerator = sum(third_moment) / n
s_denominator = sum(second_moment /n) ^ 1.5
skew = s_numerator / s_denominator
skew
}
[/code]
[code]
### sample_kurtosis.R
### Enda Hargaden, January 2013
sample_kurtosis = function(data_vec_dirty)
{
#Remove missing values
data_vec = data_vec_dirty[!is.na(data_vec_dirty)]
n = length(data_vec)
xbar = mean(data_vec)
second_moment = c()
forth_moment = c()
for(i in 1:n)
{
second_moment[i] = (data_vec[i] – xbar) ^ 2
forth_moment[i] = (data_vec[i] – xbar) ^ 4
}
k_numerator = sum(forth_moment) / n
k_denominator = ( sum(second_moment) /n )^2
kurtosis = k_numerator / k_denominator
kurtosis
}
[/code]
These are tips that I wish I had known on landing in Detroit airport. I’ll update this list as more come to mind.
I had to present on path dependence recently. Paul David’s famous QWERTY paper (American Economic Review P&P, 1985) was covered, as was Paul Pierson’s Increasing Returns, Path Dependence, and the Study of Politics (American Political Science Review, 2000).
Both of these papers reference the Polya urn model. This is a ball-and-urn process where, instead of simple replacement, there is replacement with addition of a ball of the same colour. This gives one colour a dominant position in the long run.
I coded a script to run Polya urn simulations. It’s in JavaScript, and easily adaptable. I tested it in Chrome.
[sourcecode language=”javascript”]
<html><body><script language="JavaScript">
///////////////////////////////////////////////////////////////////////////////////////////////
// Number of iterations
var runs = 400;
// Number of blue balls initially in urn
var num_blue = 1;
// Number of red balls initially in urn
var num_red = 1;
// Number of additional red/blue balls added after red/blue "wins"
var extra_extra = 1;
// Show which colour was picked etc
var details = true;
// Summarize the mean at the end
var mean_details = true;
///////////////////////////////////////////////////////////////////////////////////////////////
var initial_dist = num_red / (num_red + num_blue);
red_width = initial_dist*400;
// Graph initial distribution
document.write("Initial Distribution<br /><div style=’background-color:blue;height:10;width:400;’>");
document.write("<div style=’background-color:red;height:10;width:" + red_width +";’></div></div>");
// Random number
var r_n = 0;
var red_share = new Array();
red_share[0] = num_red / (num_red + num_blue);
for(i=1;i<runs;i++)
{
// Random number on unit interval
r_n = Math.random();
if (r_n > red_share[i-1])
{
num_blue = num_blue + extra_extra;
if(details){document.write("Blue.");}
}
if (r_n <= red_share[i-1])
{
num_red = num_red + 1;
if(details){document.write("Red.");}
}
red_share[i] = num_red / (num_red + num_blue);
if(details){document.write(" Red Share = " + num_red + "/(" + num_red + " + " + num_blue + ") = " +
red_share[i]);}
document.write("<div style=’background-color:blue;height:10;width:400;’>");
document.write("<div style=’background-color:red;height:10;width:" + red_share[i]*400 + ";></div>");
document.write("</div><div style=’background-color:white;height:5;width:400;’></div>");
}
var total = 0;
var mean = 0;
for(j=0;j<runs;j++)
{total = total+red_share[j]}
mean = total/runs;
if(mean_details){document.write("Mean of red share: " + mean);}
</script></body></html>
[/sourcecode]
What’s the easiest way to include a graphic (or graph, diagram, figure etc.) in my document?
[code]
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[h]
\centering
\caption{This is my picture}
\includegraphics[width=5in,height=3in]{adamsmith.jpg}
\end{figure}
\end{document}
[/code]
Then compile using pdflatex.
I’m getting a “no BoundingBox” error when I compile my document.
Have you tried compiling the document with pdflatex? In WinEdt, select PDFLaTeX from the dropdown menu that’s below ‘Accessories’ on the menu bar, and to the right of the recycle bin icon. If you’re compiling from the command prompt and your document is named thesis.tex, type pdflatex thesis.
I’m trying to compile my document and I am using natbib to do the references, but the document won’t compile with PDFLaTeX.
It’s unfortunate that natbib (as far as I can see) relies on latex (not pdflatex) but latex gets confused if you have graphics in the document. My workaround for this is to temporarily place a % sign in front of any graphics to turn them into comments, rather than code. This means the graphics are initially excluded, and you can run latex/bibtex and natbib will work. Once all the references are good and ready, you can remove the % signs (a quick Find > Replace All will do the trick) and compile using pdflatex.
And a rock star meets Enda.
Although my tastes have moved on over the last ten years, Quinn Allman was my favourite guitarist for quite a while.
He’s still an absolute gent, as he was when I met him seven years ago. On the other hand, I must work on looking less nerdy around cool people.
I updated the otherwise-excellent BarcodeScanner App on my LG Optimus phone and it stopped working. After the update the program just gave me a black screen with a red line on it. A quick search of an Android forum proved I’m not the only one who had this problem, it happens on all Optimus models.
The fix is simple. Uninstall the app and install the old version which can be downloaded from http://code.google.com/p/zxing/downloads/detail?name=BarcodeScanner3.72.apk. Done.
D201 Newman Building
University College Dublin
Belfield, Dublin 4, Ireland
Email: enda.hargaden1@ucd.ie