[Numpy-discussion] Fitting a curve on a log-normal distributed data
Fri Nov 20 12:27:48 CST 2009
On Thu, Nov 19, 2009 at 9:12 PM, Ian Mallett <email@example.com> wrote:
> My analysis shows that the exponential regression gives the best result
> (r^2=87%)--power regression gives worse results (r^2=77%). Untransformed
> data gives r^2=76%.
> I don't think you want lognorm. If I'm not mistaken, that fits the data to
> a log(normal distribution random variable).
Lognormal fitting is the motivation behind my study since aerosol in the
atmosphere typically log-normally size distributed. See for an example case
Of course this is just a simplification. There are other approaches to
represent the size-distribution besides the lognormal. So my intention is
not actually find the best fit but represent the actuality as much as I can.
> So, take the logarithm (to any base) of all the "conc" values. Then do a
> linear regression on those values versus "sizes".
> Try (semi-pseudocode):
> slope, intercept, p, error = scipy.stats.linregress(sizes,log(conc))
linregress also returns the r_value which I am not sure if the documentation
from the web-based editor checked-in completely to the scipy trunk yet.
> NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion