Saturday, August 18, 2007

The analysis so far....

Since my last meeting with Dr. Poon which was held on Wednesday August 15 a have been faced with a few hurdles. Firstly, Data Poon has provided me with a Data set from 1981-2002 that is already deflated and expressed in constant year 2000 dollars. The reason for this new data set to be used in analysis is that we have not been able to attain the present deflators used by the ABS for Industry Value. Consequently I will be using this new data set for my initial analysis.

I have also realised that I had slightly misinterpreted the methodology for calculating the AES. Whilst originally i was under the impression that I will need to calculate each AES for each data point for some reason (which i can't recall) I changed this interpretation to calculate the AES for each industry only. Hence, I was substituting in industry averages the AES formula (see previous post) as opposed to the values for each data point. Fortunately, this was realised quite early on and given that I have a more reliable data set I have not wasted too much time.

In my previous post I mentioned that I will be using a combination of R, Excel and Maxima to calculate the various AES's. I have now revised this to using Maxima to only simplify the differential equations to be used in the bordered Hessian matrix and use R solely for my regression analysis and AES calculations. My earlier post mentioned that R had a function via the micEcon package that calculates the bordered Hessian matrix. However since my translog model takes into account time and industry effects I will most likely need to write my own function. This should not pose too difficult though the somewhat low level nature of R can be quite frustrating especially when you are used to writing code in high-level OO languages. One of the most frustrating aspects of R is that not only does it not have inbuilt functions to determine the minor or cofactor matrix but there are no nice matrix operation like in Matlab where you can easily element rows and columns of a matrix to create a new matrix. After a few hours of searching I had to accept the fact that i needed to write my own cofactor function as well as copy the elements from the matrix whose cofactor we wish to determine element by element to create the matrix minor to be used in cofactor calculations. The function that I have written can be viewed below:

At present I am very busy with my analysis and completing my partial treatise draft and my next post will be later on next week after my meeting next Friday with Dr. Poon.

Saturday, August 11, 2007

Meeting Recap, Progress and Deliverables

This post will recap this weeks weekly treatise meeting. As mentioned last week my weekly deliverable was to provide some preliminary results of Allen Partial Elasticity of Substitution (AES) measure. I will now briefly describe the process that I undertook to do this.

Model Construction and Data

The data to be used provided by Dr. Poon was a cross-sectional data set. This means that we had observations for a number of variables across time. The independent variables observed over 1985 to 2002 are:

  • SK: Software Capital
  • HK: Hardware Capital (includes computer and peripheral but machinery and other electrical equipment)
  • OK: Organisation Capital (Difference between Capital Stock and Software Capital and Hardware Capital)
  • LH: Labour Hours
  • VA: Value Added

The productivity function that I applied is the translog-production function similar to Hitt (2002), model (1). Click on the image to enlarge and view the equation.

The choice for this model was that it does not constrain the elasticities to be unary.

Since I am assuming that the model is a Classical Linear Regression Model (CLRM) and applying Ordinary Least Squares (OLS) to estimate the parameters of the model I need to stack the data in such a way that OLS could be applied. To achieve this I stacked the data over time for each industry as per below.

I then transformed the data to be in accordance with the model (1) and a pooled OLS was then run in R to find the coefficients. The results of the regression are below:


lm(formula = lnVa ~ lnSk + lnHk + lnOk + lnLh + lnSklnHk + lnSklnOk + lnSklnLh + lnHklnOk + lnHklnLh + lnOklnLh + lnSk2 + lnHk2 + lnOk2 + lnLh2)


Min 1Q Median 3Q Max

-0.58722 -0.16982 -0.02798 0.19408 0.72151


Estimate Std. Error t value Pr(>|t|)

(Intercept) 8.493241 6.164181 1.378 0.16979

lnSk -7.735495 1.051449 -7.357 4.69e-12 ***

lnHk 4.858182 0.820692 5.920 1.37e-08 ***

lnOk -3.002444 0.727414 -4.128 5.37e-05 ***

lnLh 4.214768 1.148203 3.671 0.00031 ***

lnSklnHk -0.008317 0.093900 -0.089 0.92951

lnSklnOk 0.586699 0.088497 6.630 3.03e-10 ***

lnSklnLh 0.064016 0.058670 1.091 0.27652

lnHklnOk -0.390088 0.063354 -6.157 3.96e-09 ***

lnHklnLh -0.032604 0.044211 -0.737 0.46171

lnOklnLh -0.416532 0.053405 -7.799 3.31e-13 ***

lnSk2 0.067969 0.054974 1.236 0.21775

lnHk2 -0.018647 0.042730 -0.436 0.66303

lnOk2 0.290936 0.044207 6.581 3.97e-10 ***

lnLh2 0.032540 0.039548 0.823 0.41159


Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.2555 on 201 degrees of freedom

Multiple R-Squared: 0.8219, Adjusted R-squared: 0.8095

F-statistic: 66.26 on 14 and 201 DF, p-value: <>

It is evident that some of the results are in contradiction to the underlying economic theory but this can be owing to the quality of the data (more about this later).

Calculation of AES

To calculate the AES I needed four items:

  1. Averages of the independent of variables for each industry
  2. Partial first order derivatives, second order derivatives of the model(1)
  3. Bordered Hessian matrix for each industry
  4. Appropriate co-factor between the independent variables for each industry

As mentioned in my early post on Monday I used maxima to calculate this, which was slightly tedious as I needed re-run these calculations for each industry. However before our meeting on Wednesday Gary (another student that Dr. Poon is supervising) found an R package called micEcon. This package can calculate a translog-production function given variables in an unaltered form and the bordered Hessian matrix. This discovery greatly will reduce the time in calculating the AES for each industry as well as the coefficients of the model. Dr. Poon has suggested that I use excel in conjunction with R to calculate the AES. I will use R to calculate the bordered Hessian matrix and co-factor matrices for each industry, determine the averages of the independent variables fore ach industry and estimate the translog-production function. Excel will then be used to calculate the AES model using the date obtained from R. Maxima can still be used in trying to find a way to simplify the equations of the partial derivative similar to the equations presented in the Appendix of Dewan and Min (1997).

Below are the results of the partial AES between SK and the other independent variables for each industry. As mentioned earlier these are not highly accurate due to the problems with the underlying data. They are included to show that the calculation methodology employed is sound.

Next Weeks Deliverables

As I have mentioned throughout my post the results did contradict economic theory. Dr. Poon has suggests two things. Firstly, that I rerun my model to include a time effect variable which corresponds to every 5 years. The model will now become:

Secondly, that I worry about the results of the data later and that I should now concentrate on polishing up my calculation methodology to ensure that my procedures are correct and accurate. Dr.Poon has informed me that in my final treatise I will require a detailed description of the process that I undertook in these calculations. Furthermore Dr.Poon has also provided us with more details on the overall structure of our treatise. Since our partial treatise write up is due on August 31 Dr.Poon hopes that we will be able to complete, the Introduction & Motivation, Literature Review and Data set construction technique by then. Once I have finalised my calculation process I will publish it on the blog.

Monday, August 6, 2007

Update on Data Construction and AES implementation

Data Construction

Today I met up with Gary to continue work on the construction of the data set. However we were still slightly confused as to how some of the items were calculated. Fortunately Dr. Poon was in his office when we were working in the near by lab and we were able to clarify this. Our major concern was that our reconstruction of the data set was not matching up exactly to the numbers that Dr.Poon had calculated for each variable that is:

  • Productive Capital Stock
  • Labour Hours
  • Value Added

Dr. Poon reassured that the methods we were using were CORRECT. The differences in the numbers was due how the ABS calculates Chain Volume Measures (CVM). CVM were used for each of the variables collected. CVM are defined as an index number which allows the base year to be updated more regularly and thus the statistics will be more accurate. As the CVM’s that Dr.Poon used in his calculation for productive capital stock, labour hours and value added were different to the CVM’s calculate for these variables we were going to get different results for our calculations. As a result our data collection and construction task is greatly simplified.

The only difficult item that remains is to find out if there have been any changes in the deflators used as Dr. Poon would like us to use Current Prices as opposed to CVM. Nik will be contacting the ABS shortly to enquire if any changes have been made. We may also need to contact the ABS late on if we are going to determine Value-Add for the private and public sector. This is because the ABS reports the data as combined amount of both sectors. However, Dr. Poon informed me that this is not of high importance at present and just to ensure that we have the data set constructed for the two sectors combined.

Implementation and construction of the Allen Partial Elasticity of Substitution (AES)

In addition to gaining clarity on the finer details of the data set construction I was also able to clarify a few questions which I had about calculating AES. The first item which was clarified was the items of the border Hessian matrix. All I need to do is calculated the partial first order and second order derivatives and obtain a numerical for each element using the results obtained from the pooled regression and industry averages of the variables. Dr.Poon has instructed me to use the program Maxima ,which will greatly simplify the calculation of these derivatives. More information about maxima can be found at: I will now spend some time in becoming more familiar with Maxima to calculate these derivatives.

I was also able to clarify the calculation of the standard error of the AES which will be used to see if it statistically significant. Previously I thought that I will need to calculate the standard error for each AES for each industry. However Dr.Poon informed me that I will just need to find the standard error for the each AES across ALL industries. This once again simplifies my task. I will shortly be posting up details of my results for the various AES’ that I will calculate.

Thursday, August 2, 2007

Brief Meeting Update: 1st of August 2007

Yesterday we held our weekly meeting with Dr.Poon where we discussed our current progress on our individual projects as well as how we are progressing with our data set formation. In this post i will briefly recount the most important agendas covered in the meeting and will elaborate this in more depth in my future posts over the weekend. Two important agendas were covered in this weeks meeting which are: next weeks deliverables regarding the use of Dr.Poon's data set and further clarification was provided on the data set we are currently putting together.

Data Set Construction

Dr.Poon provided further clarification as to the construction of the new data set. Most importantly I was able to attain a greater understanding as to how Dr. Poon constructed the productive capital component of his data set. He informed me that the two ABS items that were used in his data construction were:
  • Net Capital Stock
  • Productive Capital
The differences between the two capital measures are how they take depreciation into account. Depreciation is defined as the reduction in the balance sheet value of a company asset to reflect its loss of value through age and wear and tear.Net capital stock is more items that are essentially depreciable items such as machinery. A particular form of depreciation is applied such as straight line and this is reported in the firms financial statements. Hence Net capital stock is essentially the book value of the particular capital item. Productive capital stock on the other hand is an item that still gives the same amount of use across its life such as a light bulb. As items such as these don't depreciate they are reported separately form net capital stock. Hence to find the total measure of capital for our data set we will need to combine both measures.

The use of the appropriate deflators is another important issue. Sine we are looking at a panel data set (a set of variables across time and a range of industry) we will need to express our units in constant dollar terms. Dr. Poon informed us that we may need to ring the ABS to find out how the calculated it for particular items if it not available on the website. This will be further investigate by my fellow peers and I in the coming week. Dr. Poon has also asked us to express our data set using the following variables:
  • Software Capital
  • Hardware Capital
  • Other Capital (essentially anything that is not classified as IT capital)
  • Labour Hours
  • Value Add (output)
Give these new insights I will be meeting again on Monday with my fellow peers to continue our work on this data set.


In addition to the construction of the data set Dr. Poon set each of us a particular task involving the data set he provided. My task involves calculating the AES in the R using the technique i mentioned in my earlier post for the data set he has provided. I plan to go about this in the following way:
  1. Splice up the data set into the following variables: Software Capital, Hardware Capital, Other Capital, Labour Hours, Value Add, for each industry across time
  2. Stack the panel data set so a pooled regression can be run
  3. Impose a translog function, transform the data appropriately and run the regression
  4. Using the estimates of the parameters from the regression calculate the bordered Hessian matrix
  5. Calculate the AES for all input variables for all industries
  6. Determine the Standard error for each AES calculated
  7. Apply a T-test to each AES to see if it is statistically significant or not.
I have quite a good idea how to implement this in R. I will need to write my own function to calculate the AES for each industry and I will need to spend a bit of time researching the syntax for writing R functions but this should not take more then a few hours to master this. I will recount in the next few days how I am progressing with this and report and preliminary results ASAP.