Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. 36.6 33.8 37.8 34.0 32.7 31.8 31.7 36.5 32.7
  2. 33.0 36.9 32.6 33.2 34.0 34.3 33.0 30.4 30.0
  3. 30.6 30.2 33.6 35.8 35.6 36.8 36.8 33.3 33.2
  4. 35.2 35.4 35.0 36.4 36.8 37.4 32.6 32.8 31.4
  5. 31.5 34.4 35.2 38.5 38.3 35.9 37.7 34.0 35.6
  6. 35.1 32.4 35.6 34.5 34.6 34.7 34.3 32.4 31.8
  7. 31.8 36.4 34.1 35.7 34.4 37.1 35.0 31.0 36.5
  8. 28.8 28.3 29.4 28.3 30.9 31.3 35.4 34.0 35.9
  9. 33.4 33.6 33.3 30.0 32.6 27.0 27.0 26.4 23.8
  10. 24.4 26.8 27.6 30.2 28.7 30.4 34.4 35.6 31.0
  11. 33.2 36.6 37.9 34.5 35.0 31.5 37.9 36.5 31.0
  12. 32.0 32.5 36.2 35.3 33.6 31.9 27.8 31.2 31.8
  13. 35.1 36.6 36.8 31.7 30.0 31.5 32.2 34.9 35.7
  14. 38.2 38.5 36.2 33.4 33.0 32.0 31.8
  15.  
  16. library(Hmisc)
  17. library(agricolae)
  18. library(moments)
  19. library(car)
  20. library(MASS)
  21. library(hnp)
  22. library(fitdistrplus)
  23. library(ggplot2)
  24. library(grid)
  25. library(fBasics)
  26. library(VGAM)
  27.  
  28. dados1=dados$TempMaxima
  29. dados1
  30.  
  31. ####################Estimação dos Modelos########################
  32. Gamm1 = fitdist(data = dados1, distr = "gamma")
  33. summary(Gamm1)
  34.  
  35. Weibull1 = fitdist(data = dados1, distr = "weibull")
  36. summary(Weibull1)
  37.  
  38. lnorm1 = fitdist(data = dados1, distr = "lnorm")
  39. summary(lnorm1)
  40.  
  41. beta1 = fitdist((data=dados1)/40, distr="beta")
  42. summary(beta1)
  43.  
  44. rm(dgumbel) ## get rid of previous definition
  45. ## hack behaviour of VGAM::pgumbel() a little bit
  46. pgumbel <- function(x,...) {
  47. if (length(x)==0) numeric(0) else VGAM::pgumbel(x,...)
  48. }
  49.  
  50. gumbel1 <- fitdist(dados1, "gumbel",
  51. start=list(location=10, scale=10))
  52. summary(gumbel1)
  53.  
  54.  
  55. norm1 = fitdist(data = dados1, distr = "norm")
  56. summary(norm1)
  57.  
  58. ########################### Graphics ###########################
  59. x11()
  60. par(mfrow=c(2,3))
  61. hist(dados1, probability = T, ylab = NULL,
  62. main = "Distribuição Gamma", xlab = NULL, ylim = c(0,0.15),cex = 1.5)
  63. curve(dgamma(x, shape=Gamm1$estimate[1], rate=Gamm1$estimate[2]),
  64. add=T, lwd = 2, lty = 5, col ="red")
  65.  
  66. hist(dados1, probability = T, ylab = NULL, ylim = c(0,0.15),
  67. main = "Distribuição Weibull ", xlab = NULL, cex = 1.5)
  68. curve(dweibull(x, shape=Weibull1$estimate[1], scale=Weibull1$estimate[2]),
  69. add=T, lwd = 2, col ="red")
  70.  
  71. hist(dados1, probability = T, ylab = NULL, ylim = c(0,0.15),
  72. main = "Distribuição Log-Normal ", xlab = NULL, cex = 1.5)
  73. curve(dlnorm(x, lnorm1$estimate[1], lnorm1$estimate[2]),
  74. add=T, lwd = 2, lty = 3, col ="red")
  75.  
  76. hist(dados1, probability = T, ylab = NULL, ylim = c(0,0.15),
  77. main = "Distribuição Gumbel I", xlab = NULL, cex = 1.5)
  78. curve(dgumbel(x, gumbel1$estimate[1], gumbel1$estimate[2]),
  79. add=T, lwd = 2, lty = 2, col ="red")
  80.  
  81. hist(dados1, probability = T, ylab = NULL, ylim = c(0,0.15),
  82. main = "Distribuição Normal", xlab = NULL, cex = 1.5)
  83. curve(dnorm(x, norm1$estimate[1], norm1$estimate[2]),
  84. add=T, lwd = 2,lty = 4, col ="red")
  85.  
  86. hist(dados1, probability = T, ylab = NULL,
  87. main = "Distribuição Beta", xlab = NULL, cex = 1.5)
  88. curve(dbeta(x, beta1$estimate[1], beta1$estimate[2]),add=T,lwd = 2,lty = 4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement