Fitting 4 parameter distributions in S-Plus (or R)

Click For Summary
SUMMARY

The discussion focuses on fitting sample data to a Johnson SU distribution using S-Plus, specifically utilizing the native function fitdistr. The user has successfully fitted a Gumbel distribution with a custom PDF function but encounters issues with the Johnson SU distribution due to its four parameters. Suggestions include verifying the suitability of the data for the Johnson SU distribution and increasing the maximum iterations for the optimization process used by fitdistr.

PREREQUISITES
  • Familiarity with S-Plus and its functions, particularly fitdistr.
  • Understanding of the Johnson SU distribution and its parameters (g, l, r, e).
  • Knowledge of probability density functions (PDF) and their implementation in R or S-Plus.
  • Experience with optimization techniques in statistical modeling.
NEXT STEPS
  • Investigate the implementation of custom PDF functions in S-Plus for complex distributions.
  • Learn about increasing maximum iterations in the fitdistr function to improve fitting accuracy.
  • Explore methods for identifying outliers in datasets that may affect distribution fitting.
  • Study the differences in fitting techniques between two-parameter and four-parameter distributions.
USEFUL FOR

Statisticians, data analysts, and researchers working with statistical modeling in S-Plus or R, particularly those focusing on fitting complex distributions like the Johnson SU.

mezza8
Messages
4
Reaction score
0
Hi, I am trying to fit sample data to a Johnson SU distribution in S-Plus. It seems not many people use S-Plus, so if you are familiar with R then you could help as well.

The code that I have is:


f.Jsu.fun.takeslist(x,g,l,r,e)
which is a function I have made that calculates the PDF of each value of the list x and has parameters g,l,r,e corresponding to the Johnson SU distribution. I know this PDF works because I have used it to plot graphs.

fitdistr(turn$all.turn.y.obs,f.Jsu.fun.takeslist,list(g=0.5,r=3,l=3000,e=-200))
is then what I am trying to use to fit the Johnson SU distribution. fitdistr is a native S-Plus function.


Now, the fitdistr doesn't work on this function.

What I have done previously though is fitted the Gumbel distribution using the same approach by creating my own PDF function, and fitdistr worked and provided a good fit.

The Gumbel distribution is 2 parameter and the Johnson SU is 4 parameter, so I am thinking it is just too many parameters for it to handle, although no limits are specified for fitdistr. I am by no means a master of S-Plus or R so I would appreciate anything you guys have to say on this.

Thanks! :smile:
 
Physics news on Phys.org
Can you guarantee that turn$all.turn.y.obs follows a Johnson SU? If you can't then maybe the fit is just not good, anyhow it might also be worth to look for outliers in you data.

The number of parameters should not be the problem, if anything you could also try to increase the number of max iterations for the optimizers used by fitdistr.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
487
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K