[This article was first published on Category: r | Emrah Er, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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 their blog: Category: r | Emrah Er.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)