I would like to fit a Pareto Distribution and I am using the following codes. I thought the fitted (fit1) should be the fitted value for the data, is it correct? As the result of the "fitted" turns out to be a single value for all. fit=vglm(ycf1 ~ 1, pareto1(location=alpha), trace=TRUE, crit="c") fitted(fit) The result is fitted(fit) [,1] [1,] 0.07752694 [2,] 0.07752694 [3,] 0.07752694 [4,] 0.07752694 [5,] 0.07752694 [6,] 0.07752694 [7,] 0.07752694 [8,] 0.07752694 [9,] 0.07752694 [10,] 0.07752694 [11,] 0.07752694 [12,] 0.07752694 [13,] 0.07752694 Could anybody give me some advice? -- View this message in context: http://www.nabble.com/Fitted-Value-Pareto-Distribution-tf3914151.html#a11097749 Sent from the R help mailing list archive at Nabble.com.
livia wrote:> I would like to fit a Pareto Distribution and I am using the following codes. > > I thought the fitted (fit1) should be the fitted value for the data, is it > correct? As the result of the "fitted" turns out to be a single value for > all. > > fit=vglm(ycf1 ~ 1, pareto1(location=alpha), trace=TRUE, crit="c") > fitted(fit) > > The result is > fitted(fit) > [,1] > [1,] 0.07752694 > [2,] 0.07752694 > [3,] 0.07752694 > [4,] 0.07752694 > [5,] 0.07752694 > [6,] 0.07752694 > [7,] 0.07752694 > [8,] 0.07752694 > [9,] 0.07752694 > [10,] 0.07752694 > [11,] 0.07752694 > [12,] 0.07752694 > [13,] 0.07752694 > > Could anybody give me some advice? >Your model only includes an intercept, so the fitted value is supposed to be the same for all units (there is nothing in your model that allows the fitted value to vary across units). markus -- Markus Jantti Abo Akademi University markus.jantti at iki.fi http://www.iki.fi/~mjantti
livia wrote:> I would like to fit a Pareto Distribution and I am using the following codes. > > I thought the fitted (fit1) should be the fitted value for the data, is it > correct? As the result of the "fitted" turns out to be a single value for > all. > > fit=vglm(ycf1 ~ 1, pareto1(location=alpha), trace=TRUE, crit="c") > fitted(fit) > > The result is > fitted(fit) > [,1] > [1,] 0.07752694 > [2,] 0.07752694 > [3,] 0.07752694 > [4,] 0.07752694 > [5,] 0.07752694 > [6,] 0.07752694 > [7,] 0.07752694 > [8,] 0.07752694 > [9,] 0.07752694 > [10,] 0.07752694 > [11,] 0.07752694 > [12,] 0.07752694 > [13,] 0.07752694 > > Could anybody give me some advice? >I don't have whatever package function 'vglm' comes from (did you follow the instructions in the last two lines of your post?), but you can fit a GPD and get fitted values for it by some such approach as this: library(POT) threshold <- 0 # probably para <- fitgpd(ycf1, threshold, method="pwmu")$param ycf1.fit <- qgpd( ppoints(ycf1, a=0.44), threshold, para[1], para[2]) Note that the above code contains my own preferences for fitting method and plotting positions: yours may differ. J. R. M. Hosking