sfa.simu | R Documentation |
This function is used to simulate the dataset
sfa.simu(nob,alpha,sigV,sigU,kink,family,rho,type)
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") |
Simulation dataset
out |
Y=Dependent variable, x=matrix of independent variables with nonlinear effects |
Woraphon Yamaka and Paravee Maneejuk
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.
##=========================================== 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.