To implement the weibull distribution using R programming.
dweibull(x, shape = , scale =) Gives density
pweibull(x, shape = , scale =) Gives distribution function
qweibull(p, shape = , scale =) Gives quantile fumction
rweibull(n, shape = , scale =)
Used to generate random deviates
x -- vector of quantiles
Scale -- Scale Parameter
Shape -- Shape Parameter
#Weibull Distribution
#dweibull
x<-seq(0,100,by=1)
y<-dweibull(x,shape = 3,scale=8)
plot(x,y,main=”dweibull plot”,col=”blue”)
#pweibull
y<-pweibull(x,shape=3,scale=10)
plot(x,y,main=”pweibull”,col=”red”)
#qweibull
y<-qweibull(p=0.4,shape = 2,scale = 2)
print(y)
#rweibull
x<-rweibull(n =20,shape = 4,scale = 4)
hist(x,col=275)