similar to: two-tailed exact binomail test

Displaying 20 results from an estimated 1000 matches similar to: "two-tailed exact binomail test"

2007 Apr 05
1
binom.test() query
Hi Folks, The recent correspondence about "strange fisher.test result", and especially Peter Dalgaard's reply on Tue 03 April 2007 (which I want to investigate further) led me to take a close look at the code for binom.test(). I now have a query! The code for the two-sided case computes the p-value as follows: if (p == 0) (x == 0) else if (p == 1) (x == n)
2003 Feb 14
1
FW: [Fwd: Re: [S] Exact p-values]
Dear all Just for fun, I have just downloaded the paper mentioned below and checked it with R-1.6.1. Everything is ok with exception of Table 2b, where I get always 1 instead of 0.5: > pbinom(1e15,2e15,0.5) [1] 1 Which value should be correct? Best regards Christian Stratowa ============================================== Christian Stratowa, PhD Boehringer Ingelheim Austria Dept NCE Lead
2006 Mar 22
4
pbinom( ) function (PR#8700)
Full_Name: Chanseok Park Version: R 2.2.1 OS: RedHat EL4 Submission from: (NULL) (130.127.112.89) pbinom(any negative value, size, prob) should be zero. But I got the following results. I mean, if a negative value is close to zero, then pbinom() calculate pbinom(0, size, prob). dbinom() also behaves similarly. > pbinom( -2.220446e-22, 3,.1) [1] 0.729 > pbinom( -2.220446e-8, 3,.1)
2004 Apr 30
1
Exact Binomial test feature or bug?
Dear R Users, Is the p-value reported in a two-tailed binomial exact test in error or is it a feature? If it is a feature, could someone provide a reference for its two-tailed p-value computations? Using Blaker's (2000 - Canad. J. Statist 28: 783-798) approach,the p-value is the minimum of the two-tailed probabilities $P \left(Y\geq y_{obs}\right)$ and $P\left(Y\leq y_{obs}\right)$
2009 Oct 26
1
What happen for negative binomail link in lmer() fonction?
Dear R users, I’m performing some GLMMs analysis with a negative binomial link. I already performed such analysis some months ago with the lmer() function but when I tried it today I encountered this problem: *Erreur dans famType(glmFit$family) : unknown GLM family: ‘Negative Binomial’* Does anyone know if the negative binomial family has been removed from this function? I really appreciate any
2000 Apr 07
4
Bug in qbinom? (PR#511)
n_10;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p) # This one works as expected n_100;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p) # This one causes severe problems I cannot interrupt using ESC and I finally have to resort to the Windows Task manager to kill the R session. A friend of mine told me that he faced similar problems under Unix. --please do not edit the information below-- Version:
2003 Jan 22
2
small bug in binom.test?
Hi all, I am wondering whether there is a small bug in the binom.test function of the ctest library (I'm using R 1.6.0 on windows 2000, but Splus 2000 seems to have the same behaviour). Or perhaps I've misunderstood something. the command binom.test(11,100,p=0.1) and binom.test(9,100,p=0.1) give different p-values (see below). As 9 and 11 are equidistant from 10, the mean of the
2006 Feb 03
5
pbinom with size argument 0 (PR#8560)
Full_Name: Uffe H?gsbro Thygesen Version: 2.2.0 OS: linux Submission from: (NULL) (130.226.135.250) Hello all. pbinom(q=0,size=0,prob=0.5) returns the value NaN. I had expected the result 1. In fact any value for q seems to give an NaN. Note that dbinom(x=0,size=0,prob=0.5) returns the value 1. Cheers, Uffe
2002 Jul 14
1
help with adapt function
Dear People, I'm trying to use the function adapt, from the adapt library package, which does multidimensional numerical integration. I think I must be using the wrong syntax or something, because even a simple example does not work. Consider foo <- function(x){x[1]*x[2]} and adapt(2, lo = c(-1,-1), up = c(1,1), functn = foo) This simply hangs. A more complicated example crashes R,
2007 Oct 29
1
meaning of lenwrk value in adapt function
R-listers, In using the adapt function, I am getting the following warning: Ifail=2, lenwrk was too small. -- fix adapt() ! Check the returned relerr! in: adapt(ndim = 2, lower = lower.limit, upper = upper.limit, functn = pr.set, Would someone explain what the 'lenwrk' value indicates in order to help diagnose this issue. Also, what are the possible codes for Ifail, so I can set
2007 Feb 05
3
Confidence intervals of quantiles
Can anyone please tell me if there is a function to calculate confidence intervals for the results of the quantile function. Some of my data is normally distributed but some is also a squewed distribution or a capped normal distribution. Some of the data sets contain about 700 values whereas others are smaller with about 100-150 values, so I would like to see how the confidence intervals change
2011 Nov 28
2
Retain parts of a matrix
Hi all, I'm working to apply a function that will generate a matrix of results only when a specific criteria is met. I want my final results to be a matrix with both the values that meet the criteria (the results of the function), and those that to do in the same positions in the matrix (the original numbers). Here's a sample of what I would like to do: t.mean.1.c <- c(-15, -20,
1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the order of the arguments. This is an example: > rpois(n=1,lambda=2) [1] 3 > rpois(lambda=2,n=1) [1] 2 0 It obviously uses the first argument as the number of samples to be drawn, which is wrong. I used Version 0.49 Beta (April 23, 1997). Fredrik
1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the order of the arguments. This is an example: > rpois(n=1,lambda=2) [1] 3 > rpois(lambda=2,n=1) [1] 2 0 It obviously uses the first argument as the number of samples to be drawn, which is wrong. I used Version 0.49 Beta (April 23, 1997). Fredrik
2009 May 20
3
qbinom (PR#13711)
Full_Name: Wolfgang Resch Version: R 2.8.1 GUI 1.27 OS: OS X 10.4.11 Submission from: (NULL) (137.187.89.14) Strange behavior of qbinom: > qbinom(0.01, 5016279, 1e-07) [1] 0 > qbinom(0.01, 5016279, 2e-07) [1] 16 > qbinom(0.01, 5016279, 3e-07) [1] 16 > qbinom(0.01, 5016279, 4e-07) [1] 16 > qbinom(0.01, 5016279, 5e-07) [1] 0
2007 Mar 28
1
warnings on adapt
Hi all I was wondering if someone could help me. I have to estimate some parameters, so I am using the function nlm. Inside this function I have to integrate, hence I am using the function adapt. I don't understand why it is giving the following warnings: At the beginning: Warning: a final empty element has been omitted the part of the args list of 'c' being evaluated was:
2008 Aug 05
1
optimize simultaneously two binomials inequalities using nlm( ) or optim( )
Dear R users, I?m trying to optimize simultaneously two binomials inequalities (used in acceptance sampling) which are nonlinear solution, so there is no simple direct solution. Please, let me explain shortly the the problem and the question as following. The objective is to obtain the smallest value of 'n' (sample size) satisfying both inequalities: (1-alpha) <= pbinom(c, n, p1)
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 Aug 20
1
The difference between chisq.test binom.test and pbinom
Hello all, I am trying to understand the different results I am getting from the following 3 commands: chisq.test(c(62,50), p = c(0.512,1-0.512), correct = F) # p-value = 0.3788 binom.test(x=62,n=112, p= 0.512) # p-value = 0.3961 2*(1-pbinom(62,112, .512)) # p-value = 0.329 Well, the binom.test was supposed to be "exact" and give the same results as the pbinom, while the chisq.test
2011 Nov 01
1
Sample size calculations for one sided binomial exact test
I'm trying to compute sample size requirements for a binomial exact test. we want to show that the proportion is at least 90% assuming that it is 95%, with 80% power so any asymptotic approximations are out of the questions. I was planning on using binom.test to perform the simple test against a prespecified value, but cannot find any functions for computing sample size. do any exist?