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

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.
 
Namaste & G'day Postulate: A strongly-knit team wins on average over a less knit one Fundamentals: - Two teams face off with 4 players each - A polo team consists of players that each have assigned to them a measure of their ability (called a "Handicap" - 10 is highest, -2 lowest) I attempted to measure close-knitness of a team in terms of standard deviation (SD) of handicaps of the players. Failure: It turns out that, more often than, a team with a higher SD wins. In my language, that...
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...
Back
Top