# How to calculate “start” value for fitdist function for a Tracy-Widom distribution?

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:

library(fitdistrplus)
library(RMTstat)
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.

Edit:

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

• 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. – James Phillips Apr 27 '19 at 16:55
• @JamesPhillips Good idea! Thanks a lot. – onurcanbektas Apr 27 '19 at 17:04
• 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. – Glen_b -Reinstate Monica Apr 28 '19 at 8:48

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).