Re: [R] Fitting gamma and exponential Distributions with fitdist

From: vioravis <>
Date: Wed, 27 Apr 2011 23:39:50 -0700 (PDT)

Joshua, thanks for your reply.

I have tried out the following scaling and it seems to work fine:

scaledVariable <- (test-min(test)+0.001)/(max(test)-min(test)+0.002)

The gamma distribution parameters are obtained using the scaled variable and samples obtained from this distributions are scaled back using:

scaled <- (randomSamples*(max(test) - min(test) + 0.002)) + min(test) - 0.001

Is there a better way to scale the variable??? I would prefer fitting a distribution without scaling it.

Thank you.


View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 28 Apr 2011 - 09:21:30 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 28 Apr 2011 - 09:30:42 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive