jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
56 stars 29 forks source link

Weibull distribution parameters calculation: #2790

Open Franck6S opened 3 weeks ago

Franck6S commented 3 weeks ago

JASP Version

0.18.3

Commit ID

No response

JASP Module

Distributions

What analysis are you seeing the problem on?

Weibull

What OS are you seeing the problem on?

Windows 10

Bug Description

While calculating weibull parameters, it gives wrong parameters for weibull distribution identification , please see related calculation with other software image Please found related dataset : 1200 1400 1000 2280 1680 1828 1828 1310 2100 1100 950 1360 2170 1900 2120 100 1140 517 1550 1300 1380 600 1300 1800 1182 1500 1600 1800 1800 1450 900 1115 750 1441 1082 1270 1330 1800 580 1200 800 850 870 800 1100 1130 1240

Expected Behaviour

This should have similar results values as R or Minitab software

Steps to Reproduce

  1. copy paste data
  2. distributions / weibull
  3. Generate & displaed : selection of dataset
  4. Estimated parameters selection

Log (if any)

Book5.xlsx

Final Checklist

Kucharssim commented 3 weeks ago

Dear @Franck6S,

thanks for the bug report. The issue here is that the distribution module finds the parameters by maximizing the log likelihood function. The starting points of the optimization procedure are the parameter values set in the show distribution section; by default it's shape: 1, scale: 1). The default is very far away from your data (whose scale is about 3 orders of magnitude larger than that of the default): the log likelihood function is too flat in that region and the optimization gets stuck at nonsensical values.

If I set the starting values to something more closer to the scale of your data:

Screenshot 2024-06-24 at 10 51 55

I get much more sensible output:

Screenshot 2024-06-24 at 10 58 19

I will check if we can detect such cases and give some informative message. In the meantime, I hope this helps!