Learn R Programming

RandomFields (version 3.1.36)

RMsign: Random sign

Description

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

Usage

RMsign(phi, p)

Arguments

phi
shape function of class RMmodel.
p
probability of keeping the sign

Value

RMsign returns an object of class RMmodel

Details

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

See Also

RMmodel RR.

Examples

Run this code
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))

Run the code above in your browser using DataLab