slicing: Returns a one- or two-dimensional slice of a multivariate...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/denpro.R View source: R/slicing.R

Description

Returns a one- or two-dimensional slice of a multivariate function. The functions are represented as piecewise constant functions.

Usage

1
slicing(pcf, vecci, d1 = 1, d2 = NULL)

Arguments

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

Value

a piecewise constant function

Author(s)

Jussi Klemela

See Also

draw.pcf

Examples

 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")

denpro documentation built on May 2, 2019, 8:55 a.m.