Here are different specifications: # 2nd degree polynomialįit2.1 <- locpoly(qCap, qOut, bandwidth = bw, degree = 2)įit2.2 <- locpoly(qCap, qOut, bandwidth = bw*2, degree = 2) # less variance / more biasįit2.3 <- locpoly(qCap, qOut, bandwidth = bw/2, degree = 2) # more variance / less bias I can predict the output by using capital as the only input: library(KernSmooth)įit1 = locpoly(qCap, qOut, bandwidth = bw, degree = 1) # 1st degree polynomial * Hard to interpret Single variable non-parametric regression There are no regression coefficients (the focus is the regression function) Obtains a best fit function \(m\) from the data The functional form is not defined beforehand \(\Longrightarrow\) Now I have more evidence in favour of a different approach as it was mentioned at the end of the first part of the post. that violate the quasiconcavity condition With this information I can extend the information from the last table in the first part of the post: I’ll check the quasiconcavity in an indirect way, by checking the concavity at each observation using the hessian method: # Quadratic Specificationī12 = b21 = coef(prodQuad)ī13 = b31 = coef(prodQuad)ī23 = b32 = coef(prodQuad)ĭata$mpCapQuad = with(data, b1 + b11*qCap + b12*qLab + b13*qMat)ĭata$mpLabQuad = with(data, b2 + b21*qCap + b22*qLab + b23*qMat)ĭata$mpMatQuad = with(data, b3 + b31*qCap + b32*qLab + b33*qMat)ĭata$quasiConcQuad = hmLoop 0) & det(hmLoop 0) & det(hmLoop < 0) To cehck the details please check Advanced Microeconomic Theory by Geoffrey A. Adding differentiability, you can find an optimal production plan by using derivatives. In really raw terms, quasiconcavity guarantees there is a production plan where the company is minimizing cost. In particular, any concave and twice continuously differentiable function is quasiconcave. Package lmtest provides resettest, a function that provides one of the many versions of the test, and it fits this model by default: RESET test (the name stands for Regression Equation Specification Error Test) is a test for functional form misspecification.Īs a general test, RESET helps detecting ommited variables. Ideally, I should find a model with positive predicted output and positive factor elasticity to make sense of the context of production I’m working with. These four specifications presented different problems that suggested model misspecification. + I(log(qCap)*log(qMat)) + I(log(qLab)*log(qMat)), data = data) ProdTL = lm(log(qOut) ~ log(qCap) + log(qLab) + log(qMat) + I(0.5*log(qCap)^2) ProdCD = lm(log(qOut) ~ log(qCap) + log(qLab) + log(qMat), data = data) + I(qCap*qLab) + I(qCap*qMat) + I(qLab*qMat), data = data) ProdLin = lm(qOut ~ qCap + qLab + qMat, data = data)
#Qlab 2 tutorial install
Library(stats4) #this is a base package so I don't install thisĭata("appleProdFr86", package = "micEcon") #install.packages(c("micEcon","lmtest","bbmle","miscTools")) This is what I need to retake the previously explained examples: # Libraries In the first part of this article I explained and compared four different functional forms to model apples’ production.