Estimating a semiparametric smooth-coefficient (SPSC) model in R

I am a very new R user. And for a project I need to estimate a "Semiparametric smooth-coefficient (SPSC)' model. I have been reading some published papers (including this one ) and R help files. However, I need help to know how to estimate the model.

Specifically, I have cross-section data on 1,000 households. The dependent variable is gross returns, which is a function of land and labor inputs. In addition, I have 3 risk-related variables that enter the production function in some unspecified nonlinear way. The related paper that I am following is attached.
Returnsi = α(Zi) + Landiβ1(Zi) + Laboriβ2(Zi) + ui *, i = 1 , · · · , n,
Where Z specifies the 3 risk related variables.
In terms of coding I have only got to the part where I have loaded my data and tried to use the ‘np’ library

install.packages(c("readxl", "np"))
library(readxl)
library(np)
Data=read_excel("C:/Users/Aaisha/Desktop/Data.xlsx")
head(Data)
str(Data)
Data$log_output <- log(Data$gross_inc_freshproduce)
Data$log_land <- log(Data$land_veg )
Data$log_labor <- log(Data$Labour_no )
spsc_model <- npscoef(log_output ~ log_land + log_labor | risk_behavior + risk_pref + agt_exper , data = Data)

I would appreciate any suggestions to estimate the SPSC model in R.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.