求Gandhi于2020年在JPE上发表的"On the Identification of Gross Output Production Functions"的附件资料,或者有用GNR方法求tfp的代码也可以,希望能提供Stata 代码
2条回答 默认 最新
m0_54204465 2023-01-18 16:44关注用来使用GNR方法计算TFP的代码可能会因语言和编程平台而异,下面是一个使用R语言的例子:
# Load the data data <- read.csv("data.csv") # Define the variables y <- data$output K <- data$capital L <- data$labor # Estimate the production function reg <- lm(y ~ K + L) # Calculate TFP TFP <- exp(reg$residuals) # Print the results print(TFP)这是一个基本的例子,您可能需要根据您的数据和需求来修改变量名称和模型。
同时,对于其他语言如python也有类似的实现方式,您可以查找类似的包如 statsmodel 或者 scikit-learn,并可以参考其文档来实现。
解决评论 打赏 举报无用 1