[R] fitting a truncated power law

glen_b glnbrntt at gmail.com
Thu Aug 6 03:58:24 CEST 2009



Is "k" the count? 

What are x and y? are both measured?

Don't the two k's in the "exp" term cancel?

Is there a reference?


glen_b wrote:
> 
> 
> Let me rephrase. You have some counts. You have some other measurement or
> measurements. Presumably you are trying to predict (fit) expected count in
> terms of the measurements. Can you identify which variable is the count
> and how your model describes the expected count?
> 
> Glen
> 
> 
> glen_b wrote:
>> 
>> 
>> Hang on, now I'm very confused.  What is the information you have
>> collected? Is it x and y? k and x? which one is the count?
>> 
>> 
>> John Sanders-2 wrote:
>>> 
>>> The function I'm trying to fit has the form:
>>> 
>>> P(k)
>>> ~ k^(-y) exp (– k ⁄ kx) 
>>> 
>>> And deals with count data. I'm a newbie, so any more specific suggestion
>>> would be greatly appreciated.
>>> 
>>> John Sanders-2 wrote:
>>>>
>>>> How can I fit a truncated power law to a vector? I can't find a
>>>> function
>>>> to do that. If the function provides an AIC, even better.
>>>>
>>> 
>>> Okay, "power law" I understand - f(x) = k.x^a, or on the log-scale
>>> log(f(x))
>>> = log(k) + a log(x) (linear)
>>> 
>>> I was unfamiliar with the term "truncated power law", but after looking
>>> on
>>> the internet I see that the term implies what appears to be replacing
>>> the
>>> linear fit with a linear spline fit to log(y) in terms of log(x)  - but
>>> the
>>> usual application seems to be to fit probability distribution to count
>>> data;
>>> in this case you fit essentially a two-part Pareto distribution (or Zipf
>>> if
>>> the variable is discrete) - again the log-fitted-density is like a
>>> linear
>>> spline in the logs.
>>> 
>>> Is the vector of data you have counts to which you wish to fit a
>>> distribution, or is it a set of measurements?
>>> 
>>> If I understand the problem correctly, I think it could probably be done
>>> using linear splines with GLMs, which can be done in a couple of
>>> packages.
>>> 
>>> 
>>> 
>>> 
>>> ______________________________________________
>>> R-help at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/fitting-a-truncated-power-law-tp24798791p24839164.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list