R: base R, histogr + fitted pdfs

 avatar
user_6939821
r
3 months ago
1.5 kB
6
Indexable
# _________ %%%%%%%%%%%%%%%%%%%%%%%%% ______________
# _____  !!!!  BASE R: HIST + OVERLAID FITTED PDFs ________
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

#plot histogram & curve
hist(xi, breaks = 7,  probability = T, main="", 
     xlab = "Data", 
     col="#e9e9e9")


curve(pdf_lltan_weib_fit, 1.0, 4.2, 
      add = T, lwd = 2, col="black") ## 
##  LL-Tan WEIBULL

curve(pdf_weib_fitted, 1.0, 4.2, 
      add = T, lwd = 2, 
      lty="twodash", 
      col="blue") ## 
##   WEIBULL



curve(pdf_exp_weib_fitted, 1.0, 4.2, 
      add = T, lwd = 2, 
      lty="dashed", 
      col = "red")
## EXPONENTIAL Weibull  


# curve(pdf_sin_weib_fitted, 1.0, 4.2, 
#       add = T, lwd = 2, lty="dotted", 
#       col = "darkorange2")
# ##  Sine Weibull 
##  Практич. НАЛОЖИЛОСЬ на WEIBULL и совпало, НЕХОРОШО !!!!


curve(pdf_transfsin_weib_fitted, 1.0, 4.2, 
      add = T, lwd = 2, 
      lty="dotted", 
      col = "darkolivegreen4")
##  Transformed SINE WEIBULL !!!
### ( уже НЕПЛОХО)  


curve(pdf_transmut_weib_fitted, 1.0, 4.2, 
      add = T, lwd = 2, 
      lty = "dotdash", 
      col = "darkorange2")


legend('topright',
       cex = 0.7, 
       c("LLTW", "W", "EW", "TSW", "TW"),
       lty=c(1, 6, 2,  
             3, 4),
       col = c("black", "blue", "red", "darkolivegreen4", 
               "darkorange2"), 
       bg='white')
Editor is loading...
Leave a Comment