Here's another way using quantiles.
library(VGAM) # for rpareto(...)
set.seed(1) # for reproducible example
X <- rpareto(1000,location=1,shape=1)
p <- ppoints(100)
par(mfrow=c(1,3))
plot(quantile(X,p=p),p,type="l",ylab="P(X < x)",xlab="x",main="CDF")
plot(quantile(X,p=p),1-p,type="l",ylab="P(X > x)",xlab="x",main="CCDF")
plot(log(quantile(X,p=p)),log(1-p),
ylab="log[P(X > x)]",xlab="log(x)",main="CCDF: log-log")
And here's the regression.
df <- data.frame(x=log(1-p),y=log(quantile(X,p=p)))
fit <- lm(y~x,df)
summary(fit)
# ...
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 0.039559 0.007584 5.216 1.02e-06 ***
# x -0.944380 0.005427 -174.028 < 2e-16 ***
# ---
# Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#
# Residual standard error: 0.05317 on 98 degrees of freedom
# Multiple R-squared: 0.9968, Adjusted R-squared: 0.9967
# F-statistic: 3.029e+04 on 1 and 98 DF, p-value: < 2.2e-16