Calculate Weibull distribution parameters from a histogram of wind speeds using Rstudio

Asked

Viewed 598 times

2

I can calculate the shape and scale parameters of the Weibull distribution, where I enter the wind speeds and using the fitdistr() function of the fitdistrplus package I get the shape and scale factors. Now, given any histogram of winds in a given region, how to get the shape and scale parameters?

Ps: (1) There is only the histogram, where I can extract the incidence frequencies of the winds (Y-axis) and the velocities intervals, Bins (X-axis). (2) I do not know the inert velocities of each column, knowing only the intervals.

If possible, show some example code.

HIstograma

Here’s the data I’m using

  • This problem is not trivial. A possible way to solve it (and perhaps not the best one) is to take the midpoints of each interval where the histogram is defined. Assume that the column % represents the real value of the density at these points. With this, the sample density function will be estimated at some points x and y. Now just find the Shape and Scale parameters of this function that best explain it, based on the theoretical density of Weibull. Anyway, it’s not something simple.

  • Thanks for the answer Marcus. I will test your approach. I am creating a program to calculate these parameters of Weibull, where there are two alternatives, the user enters the wind speed data of the desired region or provides other data for the same purpose. A form of insertion would be that of the histogram. What data would be needed for the calculation other than by histogram and winds or there is no other way?

  • Good question. On the head, the only two ways I can imagine to estimate the parameters of a distribution are these two: complete wind speed data and histogram. Both will give the "same" information. I put "same" in quotes because using the complete wind speed data in this specific example gives you 182,688 observations, which is a more than reasonable sample size. Using only the histogram reduces the data set to only 32 points, which can make the estimation less accurate. But I can only think of these two ways.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.