RMsign: Random sign

Description Usage Arguments Details Value Note See Also Examples

View source: R/RMmodels.R

Description

RMsign defines a random sign. It can be used as part of the model definition of a Poisson field.

Usage

1
RMsign(phi, p)

Arguments

phi

shape function of class RMmodel

p

probability of keeping the sign

Details

RMsign changes the sign of the shape function phi with probability 1-p and keeps it otherwise.

Value

RMsign returns an object of class RMmodel.

Note

Random univariate or multivariate objects usually start with RR, not with RM. This is an exception here, as it operates on shape functions.

See Also

RMmodel, RR.

Examples

1
2
3
4
5
6
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again

model <- RPpoisson(RMsign(RMtent(), p=0.8))
x <- seq(0, 10, 0.02)
plot(RFsimulate(model, x=x))

RandomFields documentation built on Jan. 19, 2022, 1:06 a.m.