权重应该等于计数,因为这些将与误差的方差成反比。 具体来说,数据模型(X一世,是的一世,n一世)是
是的一世∼ λ Φ ( (对数(X一世) - μ ) / σ+ε一世
和, σ _> 0 ,和λ > 0参数和ε一世是具有零均值和方差的独立随机变量
Var(ε(i))=σ2/ni
在哪里ni是计数。
对数的拟合x视觉上没问题:

在该图中,x 轴是对数刻度,点符号的面积与计数成正比(因此大圆在拟合中的影响比小圆更大),红线是最小二乘拟合。很明显,该模型并不真正合适:较小值的残差y往往很小,不管计数。可能应该最小化相对误差的平方和以获得适当的拟合。
很明显,最大的拟合度很差x,但那些也有小数目。
带有(我的版本)数据的R代码以及拟合和绘图程序如下。
y <- c(1, 1, 2, 1, 2, 1, 3, 4, 22, 30, 44, 58, 68, 69,
71, 72, 75, 72, 80, 78, 87, 86, 80, 82, 92, 90, 85, 61, 38, 36) / 100
x <- ceiling(exp(seq(log(20), log(500), length.out=length(y))))
counts <- c( 10, 3, 17, 20, 38, 31, 44, 55, 58, 68, 77,
82, 86, 82, 77, 75, 70, 65, 68, 51, 47, 41, 38, 30, 22, 14, 9, 4, 2, 1)
#
# The least-squares criterion.
# theta[1] is a location, theta[2] an x-scale, and theta[3] a y-scale.
#
f <- function(theta, x=x, y=y, n=counts)
sum(n * (y - pnorm(x, theta[1], theta[2]) * theta[3])^2) / sum(n)
#
# Perform a count-weighted least-squares fit.
#
xi = log(x)
fit <- optim(c(median(xi), sd(xi), max(y) * sd(xi)), f, x=xi, y=y, n=counts)
#
# Plot the result.
#
par(mfrow=c(1,1))
plot(x, y, log="x", xlog=TRUE, pch=19, col="Gray", cex=sqrt(counts/12))
points(x, y, cex=sqrt(counts/10))
curve(fit$par[3] * pnorm(log(x), fit$par[1], fit$par[2]),
from=10, to=1000, col="Red", add=TRUE)