data("post")
x.post<- seq(post$xinput[100],max(post$xinput),
length.out=100)
if (FALSE) {
# 1. When rho[x] is known and equal to 2, we set:
rho<-2
res.pwm.1<- dfs_pwm(post$xinput, post$yprod, x.post, coefm=5,
a=2, rho, ci=TRUE)
# 2. When rho[x] is unknown and dependent of x,
# its estimate hat(rho[x]) is obtained via:
rho_pwm <- rho_pwm(post$xinput, post$yprod, x.post, coefm=10, a=20)
# and the corresponding frontier estimator via:
res.pwm.2<- dfs_pwm(post$xinput, post$yprod, x.post, coefm=5,
a=2, rho_pwm, ci=TRUE)
# 3. When rho[x] is unknown but independent of x,
# a robust estimation strategy is by using the (trimmed) mean
# over the estimates hat(rho[x]):
rho_trimmean<-mean(rho_pwm, trim=0.00)
res.pwm.3<- dfs_pwm(post$xinput, post$yprod, x.post, coefm=5,
a=2, rho_trimmean, ci=TRUE)
}
Run the code above in your browser using DataLab