This is the code for fitting the PowerWall distribution to one-dimensional data. PowerWall produces the OddsRatio for a given random variable on a log-log scale.
"If Walls could talk: Patterns and anamolies in Facebook wallposts" Pravallika Devineni, Danai Koutra, Michalis Faloutsos, Christos Faloutsos
Run the code using the MATLAB function:
[slope, rsquare] = powerwall(x)
Where x is the one-dimensional discrete random variable.