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