Learn R Programming

MaskJointDensity (version 1.0)

createNoise: Create a noise

Description

This function is used to create a 5-modal noise

Usage

createNoise(n, mean = rep(NA, 5), 
sd = rep(1, length(mean)), prob = rep(1, length(mean))/length(mean))

Arguments

n

the size of noise

mean

a vector of the positions of the 5-modal distribution

sd

a vector of the standard error of the 5-modal noise

prob

a vector of the propotion of the sample from the 5-modal distribution

Value

a real vector

Details

no detalis required

References

no references

Examples

Run this code
# NOT RUN {
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--  or do  help(data=index)  for the standard data sets.

y<-rnorm(100)
noise<- createNoise(length(y))

# }

Run the code above in your browser using DataLab