I have a data with 100 million data points, and I'm trying to make a Tracy-Widom distribution fit to this data using the following R script:

x <- scan("DataRun3Results.txt")
fit.tw <- fitdist(x, "tw")

However, since there is no default "start" value for this tw distribution in the "fitdist" function, so I need to provide the "start" value such as

fit.tw <- fitdist(x, "tw", start = list(shape1 = 35, shape2 = 344))

but how do I calculate those start values for my distribution which is hopeful a Tracy-widom distribution in character.


Can someone with enough reputation create & add "tracy-widow-distrubtion" tag to this question ?

  • 1
    $\begingroup$ If you make a data subset of every 100,000th data point you will have 1,000 data points to work with, which will require far less computational power and time. Once those 1,000 points work well, you could use those distribution parameters as starting values. $\endgroup$ – James Phillips Apr 27 '19 at 16:55
  • $\begingroup$ @JamesPhillips Good idea! Thanks a lot. $\endgroup$ – onurcanbektas Apr 27 '19 at 17:04
  • $\begingroup$ I certainly hope nobody creates a tag with two separate spelling errors in it. That aside, do we really need a tag for something that has been mentioned in only 4 previous questions? (out of 137 thousand; we'd surely get a higher hit rate on hundreds of other potential tags). Feel free to discuss the merits of a tracy-widom-distribution tag on our meta, however. $\endgroup$ – Glen_b -Reinstate Monica Apr 28 '19 at 8:48

fit.tw <- fitdist(x, "tw", start = list(shape1 = 35, shape2 = 344))

As far as I can see, you don't have two shape parameters, you only have a single parameter beta. (See help(rtw)).

So the question would be: What is a good, simple guess for beta as a starting parameter? Then fitdist would try from there to find the best parameter for the specified method. The problem for the Tracy-Widom distribution is, there are only 3 possible values for beta, namely 1, 2 or 4.

So fitdist will be of no help, because it expects the possible parameters to form an interval. What fitdist would theoretically do and what you could do by hand in your special case is to calculate the likelihood of your data for all three Tracy-Widom distributions and take the one with the highest likelihood (mle is the default method, when nothing else is specified).

  • $\begingroup$ A most excellent answer, so I upvoted. $\endgroup$ – James Phillips Apr 28 '19 at 0:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.