I've been using kstest to try to see if a distribution fits my data, going through the discrete distributions from this link. I've managed to get to logser (logarithmic discrete random variable), but I can't figure out how to make this work.
I've made it work for other distributions using the line below, where the 3 arguments are n,alpha and beta.
stat, p_val = kstest(bqTableData['total_diff'], 'betabinom', args=(75,0.2,0.25))
However, using the below line is giving me the error 'cdf() argument after * must be an iterable, not float'. It seems to not like me calling logser in the same way as other distributions (though it recognises logser in and of itself, as it notes that I have forgotten argument p when not including arg)
stat, p_val = kstest(logser.pmf(x, p), 'logser',0.95)
Is there anything I'm doing wrong with this line? I created x using the below
x = np.arange(logser.ppf(0.01, p),
logser.ppf(0.99, p))