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:
- , , , , = 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.
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.