0

Please I estimated cost using translog cost function in R.

I need to save all the coefficients as a variable in my dataset.

Please how do I exteact the estimated coefficients of translog cost function and save as a variable in R?

I tried using the "coef" function but it's not working for the translog cost function (regression). It returns null when I use the "coef" function instead of returning all the coefficients.

I've attached the codes and the inbuilt R data (germanFarms) and help me to extract all the estimated coefficients, thanks.

# Estimating the inputs prices
data(germanFarms)
germanFarms$qOutput <- germanFarms$vOutput / germanFarms$pOutput
germanFarms$vLabor <- germanFarms$pLabor + germanFarms$qLabor
germanFarms$cost <- germanFarms$vLabor + germanFarms$vVarInput
germanFarms$time <- c(1:20)

# Estimating Translog cost function
Translog_fit <- translogCostEst(cName = "cost", yName = "qOutput",
                             pNames = c( "pLabor", "pVarInput" ), fNames = "land",
                             shifterNames = "time", data = germanFarms, homPrice = FALSE)
summary(Translog_fit$est)
coef(Translog_fit)
Patrick
  • 1
  • 1
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. List all non-base R packages you are using. – MrFlick Nov 08 '22 at 15:03
  • Can you post the code you've tried and sample data? If your data set is named `df`, please [edit the question](https://stackoverflow.com/posts/74362795/edit) with the code you ran and the output of `dput(df)`. Or, if it is too big with the output of `dput(head(df, 20))`. – Rui Barradas Nov 08 '22 at 15:40

0 Answers0