search for: binom

Displaying 20 results from an estimated 120 matches for "binom".

Did you mean: dbinom
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 equidi...
2006 Oct 11
2
expression as a parameter of binom.test (PR#9288)
Full_Name: Petr Savicky Version: 2.4.0 OS: Fedora Core release 2 Submission from: (NULL) (62.24.91.47) the error is > binom.test(0.56*10000,10000) Error in binom.test(0.56 * 10000, 10000) : 'x' must be nonnegative and integer while > binom.test(5600,10000) yields correct result. The same error occurrs for > binom.test(0.57*10000,10000)
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 relies on the normal asymptotics. So I would imagine the binom.test should be equal to...
2002 Sep 22
3
binom.test()
Hello everybody. Does anyone else find the last test in the following sequence odd? Can anyone else reproduce it or is it just me? > binom.test(100,200,0.13)$p.value [1] 2.357325e-36 > binom.test(100,200,0.013)$p.value [1] 6.146546e-131 > binom.test(100,200,0.0013)$p.value [1] 1.973702e-230 > binom.test(100,200,0.00013)$p.value [1] 0.9743334 (R 1.5.1, Linux RedHat 7.1) -- Robin Hankin, Lecturer, School of Geography and E...
2000 Oct 02
2
binom.test bug?
R. 1.1.0 The example below is self explanatory. ## 1 ## # works fine > binom.test((50*.64),50,.5,alt='g') ... Exact binomial test ... ## 2 ## # WHAT ! ? > binom.test((50*.65),50,.5,alt='g') Error in binom.test((50 * 0.65), 50, 0.5, alt = "g") : x must be an integer between 0 and n ## 3 ##...
2006 Oct 19
5
binom.test
R-experts: A quick question, please. >From a lab exp, I got 12 positives out of 50. To get 90% CI for this , I think binom.test might be the one to be used. Is there a better way or function to calculate this? > binom.test(x=12, n=50, p=12/50, conf.level = 0.90) Exact binomial test data: 12 and 50 number of successes = 12, number of trials = 50, p-value = 1 alternative hypothesis: true probability of suc...
2001 Jun 09
1
AW: binom.test appropriate?
No, since I'd like to test null: p <= p0 alternative: p > p0. and my understanding is that binom.test tests null: p = p0 (can only be a "simple" null hypothesis according to help(binom.test)) alternative: p > p0 (or p < p0 or p != p0). Thanks, Mirko. > -----Urspr?ngliche Nachricht----- > Von: Douglas Bates [mailto:bates at stat.wisc.edu] > Gesendet: Freitag,...
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) else { relErr <- 1 + 1e-07 d <- dbinom(x, n, p) m <- n * p if (x == m) 1...
2006 Jul 04
1
problem getting R 2.3.1 svn r38481 to pass make check-all
...ze,pthreshold)) + if (print.result) + cat(c(" FAILED\n"," PASSED\n",)[rval+1]) + if (stop.on.failure && !rval) + stop("dkwtest failed") + rval + } > > .proctime00 <- proc.time() # start timing > > > dkwtest("binom",size = 1,prob = 0.2) binom(size = 1, prob = 0.2) PASSED [1] TRUE > dkwtest("binom",size = 2,prob = 0.2) binom(size = 2, prob = 0.2) PASSED [1] TRUE > dkwtest("binom",size = 100,prob = 0.2) binom(size = 100, prob = 0.2) PASSED [1] TRUE > dkwtest("binom&quo...
1999 Jan 28
1
bug in the ctest package: binom.test
R 0630 for windows > library(ctest) > binom.test(7,10,p=0.3, alternative="two.sided") returns a p-value of =< 2.2e-016 and a warning In Splus 3.4 > binom.test(7,10,p=0.3, alternative="two.sided") returns a p-value of 0.0106 I think it is the max(v[v<=(1+eps)*PVAL]) causing the problem... max() of...
2002 Mar 22
1
binom.test and small N
running R 1.4.1 on MAC and 1.2.2 on Linux When I use run binom.test with small N the results are a little perplexing to me >binom.test(9,20,p=0.5) gives the below plus other stuff 95 percent confidence interval: 0.2305779 0.6847219 Now: >pbiom(9,20,0.6847219) [1] 0.02499998 # i.e., lower 2.5% of distribution >pbinom(9,20,0.2305779) [1] 0.99...
2009 Feb 05
1
Incorrect p value for binom.test?
I believe the binom.test procedure is producing one tailed p values rather than the two tailed value implied by the alternative hypothesis language. A textbook and SAS both show 2*9.94e-07 = 1.988e-06 as the two tailed value. As does the R summation syntax from R below. It looks to me like the alternative hypothesi...
2008 May 29
1
Accessing Value of binom.test
With this line: > binom.test(x=12, n=50, p=12/50, conf.level = 0.90) I get this output: > Exact binomial test > > data: 12 and 50 > number of successes = 12, number of trials = 50, p-value = 1 > alternative hypothesis: true probability of success is not equal to 0.24 > 90 percent confidence in...
2010 Dec 13
1
Testing an interaction with a random effect in lmer
Hi, I was hoping to get some advice regarding the testing of interactions, when one factor is modelled as a random effect... I have a model with binomial error structure where the response variable is the proportion of time spent at the main sett (animals were tracked for 28 consecutive days in each season, and were recorded either at the main sett or an outlier sett, so the response variable is a number out of 28). Animals from 9 social groups w...
2001 Jun 08
1
binom.test appropriate?
...timate conditional probabilities (success rates) in a Bernoulli experiment. In particular I want to test a null hypothesis p <= p0 versus the alternative hypothesis p > p0. As far as I understand the subject, there are UMPU tests for these types of hypotheses. Now I know about R's "binom.test" but the help text is telling me it will test only simple null hypotheses of the form p = p0. Could someone please give me a hint whether there is a suitable test or about what I got wrong? Thanks, Mirko. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-...
2009 Jan 05
2
Sweave data-figure coupling
Hi, With the following Sweave minimal file: ---<--------------------cut here---------------start------------------->--- \documentclass{article} \usepackage{Sweave} \begin{document} <<binom-sim>>= thetas <- seq(0, 1, by=0.001) prior <- rep(1, length(thetas)) / length(thetas) lik <- dbinom(1, 1, thetas) lik.p <- prior * lik post <- lik.p / sum(lik.p) <<binom-sim-fig, fig=TRUE, include=FALSE, height=3, echo=FALSE>>= layout(matrix(1:2, ncol=2)); par(mar=...
2004 Jul 13
2
confint.glm in a function
I can't get confint.glm to work from within a function. Consider the following (using R 1.9.1, Windows 2000): # FIRST: SOMETHING THAT WORKS FROM A COMMAND PROMPT DF <- data.frame(y=.1, N=100) (fit <- glm(y~1, family=binomial, data=DF, weights=DF[,"N"])) Call: glm(formula = y ~ 1, family = binomial, data = DF, weights = DF[, "N"]) Coefficients: (Intercept) -2.197 Degrees of Freedom: 0 Total (i.e. Null); 0 Residual Null Deviance: 0 Residual Deviance: -1.11e-14...
2006 Jun 29
1
using "rbinom" in C code gives me erroneous results... random variable is not random (always zero)...
Dear Listers, I am trying to use "rbinom" in my C code, but i always get zeros as output no matter the probability. Am not sure what I am doing wrong because the function has worked before. Attached in an example. Noticed that "rbinom" expects 'n' to be REAL. Regards, Vumani R 2.3.1 (2006-06-01) Windows XP Gcc /*...
2007 May 14
2
Make sign test show test statistics
When I perform a two-tailed sign test with the following simple syntax, binom.test(59,100) R returns a P-value (0.088) but nothing else. As I want the result for a one-tailed test I take P/2 = 0.044). However, the journal to which I've submitted my results requests the test statistics, not just the P-values. How can I make R return the test statistics? Best regards,...
2004 Apr 19
0
One inflated Poisson or Negative Binomal regression
Dr. Flom, I was searching the web for any examples of one-inflated negative binomial regression, and ran across your post. Fittingly, I am working on the analysis of data from the NIDA Cooperative Agreement where I had the pleasure of working with Sherry Deren and other folks at NDRI. NBR does a poor job of modeling number of sex partners. (I am using Stata.) Did you have an...