Sara Sievert
2008-Dec-13 15:20 UTC
[R] Kolmogorow-Smirnow-Test to check if Data comes from Subbotin distribution
Hi, I have a Data Set x and I want to check with a Kolmogorow-Smirnow-Test, if x comes from a Subbotin Distribution, whose density function is: function(x,location,scale,tail) # Exponential power (=Subbotin) { const<- 2*scale*tail^(1/tail) *gamma(1+1/tail) z<- (x-location)/scale exp(-1/tail*abs(z)^tail)/const } How can i do this? Thank you --
Uwe Ligges
2008-Dec-13 18:25 UTC
[R] Kolmogorow-Smirnow-Test to check if Data comes from Subbotin distribution
You have to problems: a) You need the cumulative distribution function, hence I suggest to look at package "normalp" which offers function pnormp() (as well as dnormp and other related functions that might be of interest) b) The KS test won't have much power given you are estimating the parameters of your distribution from the data. Best wishes, Uwe Ligges Sara Sievert wrote:> Hi, > I have a Data Set x and I want to check with a Kolmogorow-Smirnow-Test, if x comes from a Subbotin Distribution, whose density function is: > > function(x,location,scale,tail) # Exponential power (=Subbotin) > { > const<- 2*scale*tail^(1/tail) *gamma(1+1/tail) > z<- (x-location)/scale > exp(-1/tail*abs(z)^tail)/const > } > > How can i do this? Thank you > -- > > ______________________________________________ > R-help at 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.
Jose Iparraguirre D'Elia
2008-Dec-17 11:06 UTC
[R] Kolmogorow-Smirnow-Test to check if Data comes from Subbotin distribution
Dear Sara, You could also use the Subbotools package by Giulio Bottazzi and test the goodness of fit of your data to this distribution. See: http://www.lem.sssup.it/WPLem/files/2004-14.pdf Also, http://cafim.sssup.it/~giulio/software/subbotools/install_cygwin.html Regards, Jos? Mr Jos? Luis Iparraguirre Senior Research Economist Economic Research Institute of Northern Ireland 2 -14 East Bridge Street Belfast BT1 3NQ Northern Ireland United Kingdom Tel: +44 (0)28 9072 7365