Forum: open-discussion


RE: Bayesian Frontier Analysis [ Reply ] By: Anatole GOUNDAN on 2012-05-04 07:13 | [forum:5678] |
Thank you Sir. |
RE: Decomposition of changes in total factor productivity [ Reply ] By: Anatole GOUNDAN on 2012-05-03 21:10 | [forum:5677] |
Thank you. I try it and it is OK. |
RE: Bayesian Frontier Analysis [ Reply ] By: Arne Henningsen on 2012-05-04 05:42 | [forum:5674] |
Dear Anatole The R package frontier cannot apply the Bayesian method but only the Maximum Likelihood method for estimating frontier models. /Arne |
Decomposition of changes in total factor productivity [ Reply ] By: Arne Henningsen on 2012-05-03 07:07 | [forum:5671] |
Dear Anatole I noticed that your time specification (variable "temps") is wrong and the interaction terms of the Translog function should not be multiplied by 0.5. Furthermore, IIRC Coelli et al. (2005) ignore the panel structure, use mean-scaled inputs, and partly also mean-scale the year: library("frontier") data("riceProdPhil") riceProdPhil$area <- with( riceProdPhil, AREA / mean( AREA ) ) riceProdPhil$labor <- with( riceProdPhil, LABOR / mean( LABOR ) ) riceProdPhil$npk <- with( riceProdPhil, NPK / mean( NPK ) ) riceProdPhil$prod <- with( riceProdPhil, PROD / mean( PROD ) ) riceProdPhil$time <- riceProdPhil$YEARDUM - mean( riceProdPhil$YEARDUM ) riceTL <- sfa( log( prod ) ~ log( area ) + log( labor ) + log( npk ) + I(0.5*log(area)^2) + I(log(area)*log(labor)) + I(log(area)*log(npk)) + I(0.5*log(labor)^2) + I(log(labor)*log(npk)) + I(0.5*log(npk)^2) + time + I(time*log(area))+ I(time*log(labor))+ I(time*log(npk)) + I(0.5*time^2), data = riceProdPhil ) Alternatively, you can use: riceProdPhil$lProd <- log( riceProdPhil$prod ) riceProdPhil$lArea <- log( riceProdPhil$area ) riceProdPhil$lLabor <- log( riceProdPhil$labor ) riceProdPhil$lNPK <- log( riceProdPhil$npk ) riceTL2 <- frontierQuad( "lProd", c( "lArea", "lLabor", "lNPK", "time" ), data = riceProdPhil ) all.equal( coef(riceTL), coef(riceTL2)[c(1:4,6:8,10:11,13,5,9,12,14:17)], check.attributes = FALSE ) I will take a further look at this later. /Arne |
Package "frontier" [ Reply ] By: Anatole GOUNDAN on 2012-04-28 13:28 | [forum:5661] |
Hi everybody, I'm Anatole. I'm working on total factors productivity of the West African countries. Now, I'm trying to master the use of the package "frontier" . I tried to reproduce the example that is in the Coelli's book (2nd ed (2005), pp 303-306) on rice production (riceProdPhil) and I don't find the same result. Here is my code: > require(frontier) > data( riceProdPhil ) > riz <- riceProdPhil > riz$temps <- rep(1:8, 43) > riz <- plm.data( riz, c( "FMERCODE", "YEARDUM" ) ) > str(riz) > > ricetransl <- sfa( log( PROD ) ~ log( AREA ) + log( LABOR ) + log( NPK )+ I(0.5*log(AREA)^2)+ I(0.5*log(AREA)*log(LABOR))+ (0.5*log(AREA)*log(NPK))+I(0.5*log(LABOR)^2) + I(0.5*log(LABOR)*log(NPK))+ I(0.5*log(NPK)^2) + temps+ I(temps*log(AREA))+ I(temps*log(LABOR))+ I(temps*log(NPK)) + I(0.5*temps^2), data = riz ) I don't know if i make some mistakes in the model specification. I want also know if i can apply the bayesian approach of SFA with this package. Thank you for your help. |