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 deﬁned as follows:

• $k$, $l$, $e$, $m$, $s$ = Inputs corresponding to capital, labor, energy, materials, and purchased services,
• $y$ = represents total output,
• $Z_q$ = respective quantity indexes,
• $Z_v$ = respective values/costs (nominal terms in \$billions),
• $Z_p$ = respective price indexes,
• $Z_s$ = 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 ($S_S$) 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.