KLEMS (1)

September 22, 2012
By

(This article was first published on Category: r | Emrah Er, and kindly contributed to R-bloggers)

This post is actually a homework I did. The data file contains input use, output, quantities, costs, and prices for total U.S. nondurable manufacturing for 1949-2001.

The data are defined as follows:

  • , , , , = Inputs corresponding to capital, labor, energy, materials, and purchased services,
  • = represents total output,
  • = respective quantity indexes,
  • = respective values/costs (nominal terms in $billions),
  • = respective price indexes,
  • = respective cost shares.

We conducted an analysis that is similar to Berndt and Wood (1975) and Binswanger, H. P. (1974).

Questions in the homework were:

  • Estimating the parameters of the cost function by estimating a system of factor demand equations.
  • Testing linear homogeneity (within-equation adding-up) and symmetry.
  • Testing for structural change that occurred with a discrete break in 1973 in the factor demand system.
  • Estimating the output-constant, factor-demand price elasticities, the Allen and Morishima elasticities of substitution at the mean values of the data.

The translog cost function given was:

Factor demand equations can be found from the given translog cost function by using Shephard’s Lemma:

By using factor demand equations we can estimate the parameters of the cost function. In order to do this we have to impose symmetry and homogeneity restrictions and estimate the system of demand equations. We can drop Services () equation while estimating the system and recover its parameters by using the imposed restrictions. We have to use the following restrictions:

To call the required packages and to import the data file into R I used the following commands

Using the imported data I have created new series. I have done this by using the following commands:

To plot the series I have created new data frames which are in time series format and then used ts.plot. Probably there are other and easier ways to this (using ggplot2 maybe) but I used the following codes:

Here are the graphs and codes for producing them.

To leave a comment for the author, please follow the link and comment on his blog: Category: r | Emrah Er.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.