sfa.simu: Simuation data from Copula based nonlinear Stochastic...

View source: R/sfa.simu.r

sfa.simuR Documentation

Simuation data from Copula based nonlinear Stochastic frontier Model

Description

This function is used to simulate the dataset

Usage

sfa.simu(nob,alpha,sigV,sigU,kink,family,rho,type)

Arguments

nob

Number of simulated data

alpha

vector of true parameters

sigV

Variance of V

sigU

Variance of U

kink

kink or threshold parameter

family

Copula function eg. Gaussain=1, Student-t=2,... (see, Vinecopula package)

rho

copula parameter

type

nonlinear structure, type=c("kink", "threshold")

Details

Simulation dataset

Value

out

Y=Dependent variable, x=matrix of independent variables with nonlinear effects

Author(s)

Woraphon Yamaka and Paravee Maneejuk

References

Maneejuk, P., Yamaka, W., & Sriboonchitta, S. (2017). Analysis of global competitiveness using copula-based stochastic frontier kink model. In Robustness in Econometrics (pp. 543-559). Springer, Cham.

Examples

##===========================================
library(truncnorm)
library(CDVine)
library(copula)
library(frontier)
library(matrixStats)
library(matrixcalc)
library(sn)
library(e1071)
library(randtoolbox)
set.seed(2125)
nob=300
n=nob
alpha=c(0.5,-0.8,0.7)
sim=sfa.simu(nob=nob,alpha=alpha,sigV=0.5,sigU=1,kink=0.7,family="sn",rho=0.8, type="kink")

sim=sfa.simu(nob=nob,alpha=alpha,sigV=0.5,sigU=1,kink=0.7,family="sn",rho=0.8, type="threshold")

data=data.frame(sim$Y,sim$X)
y=data[,1]
x=data[,2]
windows()
plot(x,y)


woraphonyamaka/SFMkink documentation built on July 8, 2022, 9:15 a.m.