data.frame
of them. The method is more broadly known as conditional simulation method. This function is an empirical parallel to simCOP
that is used for parametric copulas. If circumstances require conditional simulation of $V|U$, then function EMPIRsimv
, which produces a vector of $V$ from a fixed $u$, should be used.For the usual situation in which an individual $u$ during the simulation loops is not a value aligned on the grid, then the bounding conditional quantile functions are solved for each of the $n$ simulations and the following interpolation is made by
EMPIRsim(n=100, empgrid=NULL, kumaraswamy=FALSE, na.rm=TRUE, keept=FALSE,
graphics=TRUE, ploton=TRUE, points=TRUE, snv=FALSE,
infsnv.rm=TRUE, trapinfsnv=.Machine$double.eps, ...)
EMPIRgrid
;EMPIRgridderinv
. The Kumaraswamy distribution is a distribution having support $[0,1]$NA
entries on the returned data.frame
;data.frame
;ploton
and points
to FALSE
and overriding whatever their settings were;points()
function in R;data.frame
(Curiously, Joe (2014) advocates extensively for use of normal scores, which is in contrast to Nelsen (2006) who
TRUE
and presumably small, the numerical value of this argument ($\eta$) is used to replace $u = {0,1}$ and $v = {0,1}$ with $u(0) = v(0) = \eta$ or $u(1) = v(1) = 1 - \eta$ as appropriate when conversion to standard normal variates is topoints()
function in R.data.frame
of the simulated values is returned.EMPIRgrid
, EMPIRgridderinv
, EMPIRsimv
pdf("EMPIRsim_experiment.pdf")
nsim <- 5000
para <- list(alpha=0.15, beta=0.65,
cop1=PLACKETTcop, cop2=PLACKETTcop, para1=0.005, para2=1000)
set.seed(1)
uv <- simCOP(n=nsim, cop=composite2COP, para=para, snv=TRUE,
pch=16, col=rgb(0,0,0,.2))in \R
mtext("A highly complex simulated bivariate relation")
# set.seed(1) # try not resetting the seed
uv.grid <- EMPIRgrid(para=uv, deluv=0.025)
uv2 <- EMPIRsim(n=nsim, empgrid=uv.grid, kumaraswamy=FALSE, snv=TRUE,
col=rgb(1,0,0,0.1), pch=16)
mtext("Resimulation without Kumaraswamy smoothing")
uv3 <- EMPIRsim(n=nsim, empgrid=uv.grid, kumaraswamy=TRUE, snv=TRUE,
col=rgb(1,0,0,0.1),pch=16)
mtext("Resimulation but using the Kumaraswamy Distribution for smoothing")
dev.off()
nsim <- 5000
set.seed(1)
uv1 <- simCOP(n=nsim, cop=PSP, para=NULL, snv=TRUE)
semicorCOP(cop=EMPIRcop, para=uv2, samcor=TRUE)
uv.grid <- EMPIRgrid(para=uv, deluv=0.01)
set.seed(1)
uv2 <- EMPIRsim(n=nsim, empgrid=uv.grid, snv=TRUE,
col=rgb(1,0,0,0.1), pch=16)
mtext("Resimulation without Kumaraswamy smoothing")
semicorCOP(cop=EMPIRcop, para=uv2, samcor=TRUE)
# See other examples under EMPIRsimv
Run the code above in your browser using DataLab