Displaying 20 results from an estimated 7000 matches similar to: "How to test user-defined distribution using ks.test in R?"
2009 Dec 02
5
Problem with "Cannot compute correct p-values with ties"
Dear All,
1. why did the problem happen?
2. How to solve it?
--
Best wishes,
Zhijiang Wang
--------------------------------------------
PHD Student
Room 212, Science buliding,
The International WIC Institute,
College of Computer Science and Technology,
Beijing University of Technology,
Beijing, China.
2010 Mar 13
1
What can I use instead of ks.test for the binomial distribution ?
Hello all,
A friend just showed me how ks.test fails to work with pbinom for small
"size".
Example:
x<-rbinom(10000,10,0.5)
x2<-rbinom(10000,10,0.5)
ks.test(x,pbinom,10,0.5)
ks.test(x,pbinom,size = 10, prob= 0.5)
ks.test(x,x2)
The tests gives significant p values, while the x did come from
binom with size = 10 prob = 0.5.
What test should I use instead ?
Thanks,
Tal
2011 Oct 06
2
KS test and theoretical distribution
> x <- runif(100)
> y <- runif(100)
> ks.test(x,y)
Two-sample Kolmogorov-Smirnov test
data: x and y
D = 0.11, p-value = 0.5806
alternative hypothesis: two-sided
ok I expected that, but:
> ks.test(runif(100), "runif")
One-sample Kolmogorov-Smirnov test
data: runif(100)
D = 0.9106, p-value < 2.2e-16
alternative hypothesis: two-sided
How
2006 May 09
4
ks.test one-sample - where can I get a list of the strings specifying the distribution?
Dear all,
One can use ks.test(x,y) for a one-sample kolmogorov-smirnov test:
x being the data sample
y being a string specifying a distribution
I notice the help on ks.test does not tell you how to get such a list. Is
this a hole in my R knowledge?
Where can I get a list of the strings specifying the possible
distributions?
and more specifically
What would be the string and following
2005 Apr 07
1
ks.test for conditional distribution Y|x
Couldn't you do this by subtracting 0.5 + x from your y values and checking
for normality with mean 0 and sd = 1 (using ks.test or another test of
normality).
If you fail, you'll have to do additional work to find out whether pairs
with some particular x value (or range of x values) is causing the problem,
but I think this fits the question as stated.
Of course, if you have discrete x
2015 Apr 25
3
Can we get a copy of ks.cfg for varous images into /root/ks.cfg?
I've recently been dealing with various CentOS images on AWS, and am
being forcibly reminded that the "/root/anaconda-ks.cfg" has only a
passing resemblance to whatever the kickstart configuration file
actually contained. But getting a copy of the actual "ks.cfg" is
invaluable for updating and testing variations of the kickstart setup,
especially when manipulating disk
2007 Apr 28
1
The confidence level of p-value of ks.boot
Hello!
I need to compare 2 datasets whether they come from the same distribution. I use function ks.boot{Matching}. And what is the confidence level of the p-value, returned by ks.boot function?
The code is:
set=read.table("http://stella.sai.msu.ru:8080/~gala/data/testsets.csv",
header=T,sep=',')
set1=set[!is.na(set$set1),'set1']
2012 Oct 12
1
ks.test not working?
Hi,
I am performing GEV analysis on temperature/precipitation data and want to use the ks.boot function but I am unsure of how to implement it using the pgev distribution.
For example:
ks.test(data,pgev,shape,location,scale)
ks.boot(data,(distribution parameters?),alternative="pgev",nboots=1000)
Any advice? Apologies in advance if I have used the wrong email address.
Regards,
Louise
2013 Apr 05
2
retrieveing value from KS test
Hi.
how can i insert the value of p_value from KS.test into vector?
Regards,
Irit.
--
View this message in context: http://r.789695.n4.nabble.com/retrieveing-value-from-KS-test-tp4663439.html
Sent from the R help mailing list archive at Nabble.com.
2006 Dec 15
2
ks.test "greater" and "less"
Hello r-group
I have a question to the ks.test.
I would expect different values for less and greater between data1 and
data2.
Does anybody could explain my point of misunderstanding the function?
data1<-c(8,12,43,70)
data2<- c(70,43,12,8)
ks.test(data1,"pnorm")
ks.test(data1,"pnorm",alternative ="less") #expected < 0.001
2008 Aug 13
3
ks
I made a file partition-ks.cfg and put it in our machine 192.168.5.17
under /var/www/html. When I install a new machine I just do a
linux ks=http://192.168.5.17/partition-ks.cfg
I have a couple questions though:
1) I have the following in it:
clearpart --all
part /boot --fstype ext3 --size=100
part /var --fstype ext3 --size=10000
part / --fstype ext3 --size=10000
2008 Feb 14
1
ks.test help
I am trying to do a ks.test in R 2.6.2 (running on Mac OS X 10.4.11).
In the help guides it specifies that the y variable can be a
character string for the type of distribution I want. I am doing this
on the residuals of a regression model, but I continue to get an
error. This is some of the code I have tried:
> ks.test(res,"Norm")
Error in get(y, mode =
2006 Feb 03
2
Problems with ks.test
Hi everybody,
while performing ks.test for a standard exponential distribution on samples
of dimension 2500, generated everytime as new, i had this strange behaviour:
>data<-rexp(2500,0.4)
>ks.test(data,"pexp",0.4)
One-sample Kolmogorov-Smirnov test
data: data
D = 0.0147, p-value = 0.6549
alternative hypothesis: two.sided
>data<-rexp(2500,0.4)
2012 Sep 28
1
Crosstable-like analysis (ks test) of dataframe
Hi,
I have a dataframe with multiple (appr. 20) columns containing
vectors of different values (different distributions).
Now I'd like to create a crosstable
where I compare the distribution of each vector (df-column) with
each other. For the comparison I want to use the ks.test().
The result should contain as row and column names the column names
of the input dataframe and the cells should
2008 Jul 01
2
Problem with loading library-ks
Hi,
I am trying to load the library(ks), but I am getting the following error:
Loading required package: KernSmooth
KernSmooth 2.22 installed
Copyright M. P. Wand 1997
Loading required package: mvtnorm
Loading required package: rgl
Loading required package: misc3d
Error in lazyLoadDBfetch(key, datafile, compressed, envhook) :
ReadItem: unknown type 241
In addition: Warning messages:
1:
2001 Jun 29
1
KS test in R.1.3.0 has incorrect p-values. (PR#1004)
Based on a report to the Windows maintainers from Richard Rowe
<Richard.Rowe@jcu.edu.au>:
NEWS for 1.3.0 says
o Exact p-values are available for the two-sided two-sample
Kolmogorov-Smirnov test.
I think the (new) p-values are computed but are backwards:
> set.seed(123)
> x <- rnorm(50)
> y <- runif(50)
> ks.test(x,y, exact=T)$p
[1] 1
> 1 - ks.test(x,y,
2007 Nov 16
2
ks.test
Hello,
I want to do normality test on my data
I write this but I don't understand the display of the results
ks.test(data,"pnorm")
In fact I want to know if my data is a normal distribution. I have to check the p-value or D?
Thanks.
_____________________________________________________________________________
l
[[alternative HTML version deleted]]
2017 Nov 15
2
ks.test() with 2 samples vs. 1 sample an distr. function
Dear all,
I have a question concerning the ks.test() function. I tryed to calculate the example given on the German wikipedia page.
xi <- c(9.41,9.92,11.55,11.6,11.73,12,12.06,13.3)
I get the right results when I calculate: ks.test(xi,pnorm,11,1)
Now the question: shouldn't I obtain the same or a very similar result if I commpare the sample and a calculated sample from the distribution?
2010 Aug 20
3
how to interpret KS test
Dear R users
I am using KS test to compare two different distribution for the same
variable (temperature) for two different time periods.
H0: the two distributions are equal
H1: the two distributions are different
ks.test (temp12, temp22)
Two-sample Kolmogorov-Smirnov test
data: temp12 and temp22
D = 0.2047, p-value < 2.2e-16
alternative hypothesis: two-sided
Warning message:
In
2006 Jul 09
1
KS Test Warning Message
All,
Happy World Cup and Wimbledon. This morning finds me with the first
of my many daily questions.
I am running a ks.test on residuals obtained from a regression model.
I use this code:
> ks.test(Year5.lm$residuals,pnorm)
and obtain this output
One-sample Kolmogorov-Smirnov test
data: Year5.lm$residuals
D = 0.7196, p-value < 2.2e-16
alternative hypothesis: two.sided
Warning