zdat = data.frame(y = 1:5, w = c(63, 14, 5, 1, 2))
fit = vglm(y ~ 1, zipf, zdat, trace=TRUE, weight=w, cri="c")
fit = vglm(y ~ 1, zipf(link=identity, init=3.4), zdat, tra=TRUE, weight=w)
fit@misc$N
(shat = Coef(fit))
with(zdat, weighted.mean(y, w))
fitted(fit, mat=FALSE)
Run the code above in your browser using DataLab