Open tungttnguyen opened 1 year ago
Hey @tungttnguyen thanks for submitting this issue! I've really neglected this package and have even thought about deprecating but I keep coming back to it and recently have been using the distribution functionality; however, like you've found it's hard to get the mle to work with pearson type 3 distributions (log as well). It's even harder to abstract the nuances needed when doing analysis and I've been thinking on how to do that but looks like a whole rewrite of the code-base and new package might be the approach.
The package is a kitchen sink of things I was doing a few years back but I've slowly started to branch out (whitewater is a branch of this) and maybe it's time to do the same with the distribution functionality. I'd be open to suggestions and if you'd like to collaborate please let me know :). In the mean time, it looks like the {fasstr} package will only run 'mme' on when 'PIII' is the fit_distr
, which then doesn't have any convergence errors and why 'mge' is also working. Since each fitdist()
call in {wildlandhydRo} has ...
you can pass something like below and it will work. But, this might not be the best parameter estimation for your data per distribution, which leads ...
abstraction hard to customize...
# get distributions
usgs_dist <- batch_distribution(peak_usgs, peak_va, 'mge')
The {fasstr} package looks really sweet and really well done! If you're wanting to just use pearson and weibull then I'd recommend going with that or some other workflow you have but maybe in the near future I'll get something going with {whitewater} and {someFreqPackage} to be more user friendly, etc.
Thanks!
Thank you very much for the detailed response! I was able to make LP3 work by modifying your code to allow customizing for LP3 method only. Like you said, I found that mle
worked great most of the time except for LP3 distribution. I am happy to make a PR using the small fix that I made. And I am interested in collaborating so please let me know if you'd like to discuss more
Hey @tungttnguyen, I think I'm going to start a new repository and transfer the distribution functions over to it. However, feel free to make a PR as that will then get transferred in the process. From there, I really want to refactor a lot of the code particularly with the preparation of data in addition to visualizing. fitdistrplus
and other packages do all the heavy lifting but maybe this package could help with prepping and bringing together different techniques for parameter estimation.
Hello Josh,
I came across your package and really like its functionality. However, I ran into one issue when applying
batch_distribution
to USGS Gage 15875000. It looks like the error was due tofitdist
failed to estimatemle
parameters. Is there anyway to specify desired fitting methods as well as distributions when runningbatch_distribution
? Thank you!Reprex below
Using a different method for
fitdist
e.g., "mge": 'maximum goodness-of-fit estimation'Or using a different package
fasstr
Created on 2023-10-24 with reprex v2.0.2