Learn R Programming

RandomFields (version 3.0.10)

RMsign: Random sign

Description

RMsign defined 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

Details

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

See Also

RMmodel, RMmatrix,

Examples

Run this code
RFoptions(seed=0)
model <- RPpoisson(RMsign(RMtent(), p=0.8))
x <- seq(0, 10, if (interactive()) 0.02 else 1) 
plot(RFsimulate(model, x=x))
RFoptions(seed=NA)

Run the code above in your browser using DataLab