Skip to content
Prev 364168 / 398500 Next

add outlier in data set

dear r users

I have one question that how we add one or more outliers in the data set.


For example if we generate data set from Weibull distribution using function

n=10
k<-rweibull(n, shape=2.5, scale = 1.3)
k

the output is
[1] 0.6507619 0.6229385 1.6838931 1.1661324 0.4907947 1.3416666 0.9536739 0.9368029 1.1992996
[10] 0.8401084


now i want to add outlier in the output of the values.

In simple words i want to generate a data set and then i add one or two outlier in that data set.