Description Usage Arguments Value Author(s) See Also Examples
View source: R/denpro.R View source: R/slicing.R
Returns a one- or two-dimensional slice of a multivariate function. The functions are represented as piecewise constant functions.
1 |
pcf |
a piecewise cosntant function |
vecci |
vector inside the support of the function which fixes the variables; length of "vecci" is d-2 or d-1, depending on whether the slice is 2- or 1-dimensional |
d1 |
integer 1,...,d; the first variable of the slice |
d2 |
integer 1,...,d, not equal to d1; the second variable of the slice |
a piecewise constant function
Jussi Klemela
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # 2D slice of a 3D function
N<-c(26,26,26) # choose the grid size
copula<-"gauss"
margin<-"student"
b<-4
support<-c(-b,b,-b,b,-b,b)
r<-0.5 # parameter of the copula
t<-c(2,2,3) # degreeds of freedom for the student margin
pcf<-pcf.func(copula,N,marginal=margin,support=support,r=r,t=t)
sl<-slicing(pcf,d1=1,d2=2,vecci=0)
dp<-draw.pcf(sl)
persp(dp$x,dp$y,dp$z,theta=30,phi=30)
# 1D slice of a 2D function
N<-c(60,60)
pcf<-sim.data(N=N,type="mulmod")
sl<-slicing(pcf,vecci=0)
dp<-draw.pcf(sl)
plot(dp$x,dp$y,type="l")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.