Research breakthrough possible @S-Logix pro@slogix.in

Office Address

  • 2nd Floor, #7a, High School Road, Secretariat Colony Ambattur, Chennai-600053 (Landmark: SRM School) Tamil Nadu, India
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to implement the Weibull Distribution in R?

Description

To implement the weibull distribution using R programming.

Process

Four main functions in weibull distribution:

  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

Sapmle Code

#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)

Screenshots
implement the Weibull Distribution in R
Four main functions in weibull  distribution
weibull  distribution
generate random deviates