similar to: ks.test "greater" and "less"

Displaying 20 results from an estimated 4000 matches similar to: "ks.test "greater" and "less""

2007 Jun 08
2
pnorm how to decide lower-tail true or false
Hi to all, maybe the last question was not clear enough. I did not found any hints how to decide whether it should use lower.tail or not. As it is an extra R-feature ( written in http://finzi.psych.upenn.edu/R/Rhelp02a/archive/66250.html ) I do not find anything about it in any statistical books of me. Regards Carmen
2007 Jun 06
6
p-value from GEE
Hi to all, I found in the R-help archive how to calculate the p-value for a gee result: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/74150.html but there are two questions (I am afraid they are basic questions ...) 1. why is the result multiplicated with 2 2. how could I decide between lower.tail =TRUE and FALSE: example:
2006 Nov 29
4
String question
Hi to all I would to determinate whether bits is a binary code and I would to find out the which bit is set to 1 bits <-"00110110" I found to detect whether there are only numbers all.digits(bits) but is there any function to detect whether there are only 0 and 1 in the string And how could I get the f.e the third "bit" from the right hand side With regards Carmen
2006 Nov 30
3
writing function with ,... )
Hi to all I did not found the right hints for functions with the dot-dot-dot argument. Is it possible to write own functions with the tree dots and if yes what's wrong with the following example? test <- function(x, ...) { print (x) if (exists("y"))print(y) if (exists("z"))print(z) } test(4,y=2) With regards Carmen
2006 Nov 08
10
axis command and excel time format
Hi to all, I have some problems to get the times-scale to the x-axis the times are coming from an excel sheet f. e [1] "0:01:00" "0:02:00" "0:03:00" "0:04:00" "0:05:00" "0:06:00" "0:07:00" [8] "0:08:00" "0:09:00" "0:10:00" "0:11:00" "0:12:00" "0:13:00"
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
2009 Sep 08
1
Unexpected behavior in friedman.test and ks.test
I have to start by saying that I am new to R, so I might miss something crucial here. It seems to me that the results of friedman.test and ks.test are "wrong". Now, obviously, the first thing which crossed my mind was "it can't be, this is a package used by so many, someone should have observed", but I can't figure out what it might be. Problem: let's start with
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]]
2008 Apr 18
1
2.2e-16 a magic number? ks.test help
Hello, I'm trying to test my data for normality. I enter the data (95ish species counts) run >ks.test (data,pnorm) and get a p- value <2.2e-16 But this seems to be the p-value no matter what the data I enter. (I have multiple datasets and am testing them all for normality). [Actually, I just entered a vector of 1's and the p-value changed.] When I use the >Shapiro.test command,
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?
2004 Aug 06
3
Bug in qnorm or pnorm?
I found the following strange behavior using qnorm() and pnorm(): > x<-8.21;x-qnorm(pnorm(x)) [1] 0.0004638484 > x<-8.22;x-qnorm(pnorm(x)) [1] 0.01046385 > x<-8.23;x-qnorm(pnorm(x)) [1] 0.02046385 > x<-8.24;x-qnorm(pnorm(x)) [1] 0.03046385 > x<-8.25;x-qnorm(pnorm(x)) [1] 0.04046385 > x<-8.26;x-qnorm(pnorm(x)) [1] 0.05046385 > x<-8.27;x-qnorm(pnorm(x))
2011 Feb 21
1
question about solving equation using bisection method
Hi all, I have the following two function f1 and f2. f1 <- function(lambda,z,p1){ lambda*(p1*exp(-3*z-9/2)+(0.2-p1)*exp(4*z-8))-(1-lambda)*0.8} f2 <- function(p1,cl, cu){ 0.8*(pnorm(cl)+(1-pnorm(cu)))/(0.8*(pnorm(cl)+(1-pnorm(cu)))+p1*(pnorm(cl+3)+(1-pnorm(cu+3)))+(0.2-p1)*(pnorm(cl-4)+(1-pnorm(cu-4))))}-0.05 First fix p1 to be 0.15. (i) choose a lambda value, say lamda=0.6, (ii)
2005 Mar 18
1
Pb with ks.test pvalue
Hello, While doing test of normality under R and SAS, in order to prove the efficiency of R to my company, I notice that Anderson Darling, Cramer Van Mises and Shapiro-Wilk tests results are quite the same under the two environnements, but the Kolmogorov-smirnov p-value really is different. Here is what I do: > ks.test(w,pnorm,mean(w),sd(w)) One-sample Kolmogorov-Smirnov test data: w D
2009 Jul 17
2
how to evaluate character vector within pnorm()
Hi, I'm trying to evaluate a character vector within pnorm. I have a vector with values and names x = c(2,3) names(x) = c("mean", "sd") so that i tried the following temp = paste(names(x), x, sep = "=") #gives #> temp #[1] "mean=2" "sd=3" #Problem is that both values 2 and 3 are taken as values for the mean argument in pnorm pnorm(0,
2004 Jun 16
2
erf function documentation
Hi all. I may be wrong, (and often am), but in trying to determine how to calculate the erf function, the documentation for 'pnorm' states: ## if you want the so-called 'error function' erf <- function(x) 2 * pnorm(x * sqrt(2)) - 1 ## and the so-called 'complementary error function' erfc <- function(x) 2 * pnorm(x * sqrt(2), lower=FALSE) Should, instead, it read:
2011 Sep 11
3
(no subject)
Dear all, Can anyone take a look at my program below? There are two functions: f1 (lambda,z,p1) and f2(p1,cl, cu). I fixed p1=0.15 for both functions. For any fixed value of lambda (between 0.01 and 0.99), I solve f1(p1=0.15, lambda=lambda, z)=0 for the corresponding cl and cu values. Then I plug the calculated cl and cu back into the function f2. Eventually, I want to find the lambda value
2010 May 13
1
results of pnorm as either NaN or Inf
I stumbled across this and I am wondering if this is unexpected behavior or if I am missing something. > pnorm(-1.0e+307, log.p=TRUE) [1] -Inf > pnorm(-1.0e+308, log.p=TRUE) [1] NaN Warning message: In pnorm(q, mean, sd, lower.tail, log.p) : NaNs produced > pnorm(-1.0e+309, log.p=TRUE) [1] -Inf I don't know C and am not that skilled with R, so it would be hard for me to look into
2009 Feb 12
1
Optim
Dear R user I follow the steps defined in Modern applied statistics page(453) to use optim. However, when I run the following code the parameters seems way off and the third parameter(p3) stayed as the initial value. below is the code: ## data da=c(418,401,416,360,411,425,537,379,484,388,486,380,394,363,405,383,392,363,398,526) ### initial values pars=c(392.25, 507.25, 0.80)
2009 Dec 08
4
lower.tail option in pnorm
Hi, I would have thought that these two constructions would produce the same result but they do not. Resp <- rbinom(10, 1, 0.5) Stim <- rep(0:1, 5) mm <- model.matrix(~ Stim) Xb <- mm %*% c(0, 1) ifelse(Resp, log(pnorm(Xb)), log(1 - pnorm(Xb))) pnorm(as.vector(Xb), lower.tail = Resp, log.p = TRUE) > ifelse(Resp, log(pnorm(Xb)), log(1 - pnorm(Xb))) [1] -0.6931472 -1.8410216
2012 Feb 02
1
Calculate the natural log of cdf between 2 intervals
Hello all, I was wondering if there is an R function to do the following: [*] log(pnorm(x)-pnorm(y)), where x>y. I don't want all the area under the natural log of the normal pdf less than x, I only want the area between y and x. I am aware of the ability to specify log.p=TRUE, which gives me the log of the probability that X<=x. This does not help me, because the following code: