Dear R-users,

 

I am new to R and would like to use it for fitting the zipf distribution to
some numeric data that I have. Here's the snippet that I use:

 

library(VGAM)

X <- read.table(file("~\\mydata.txt", encoding="latin1"))

w <- as.vector(t((X[2])))

w <- w/sum(w)

y <- (1:length(w))

fit = vglm  (y ~ 1, zipf, tra=TRUE, weight=w)

zipf(N=NULL, link="loge", earg=w, init.s=NULL)

coef(fit, matrix=FALSE)

 

 

Though R returns the necessary values, I am not entirely sure if this value
returned (by the last command),is log(s) or log(-s), where s is the zipf
exponent.

 

Any clarification would be greatly appreciated! Thank you in advance!


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to