Displaying 20 results from an estimated 3000 matches similar to: "Sweave data-figure coupling"
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 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
2011 Mar 19
2
problem running a function
Dear people,
I'm trying to do some analysis of a data using the models by Royle & Donazio
in their fantastic book, particular the following function:
http://www.mbr-pwrc.usgs.gov/pubanalysis/roylebook/panel4pt1.fn
that applied to my data and in the console is as follows:
> `desman.y` <- structure(c(3L,4L,3L,2L,1L), .Names = c("1", "2", "3",
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 hypothesis language should be revised
to something like " ... greater than or equal
2005 Nov 11
1
optim not giving correct minima
Hello,
I am trying to use optim() on a function involving a summation. My
function basically is a thinned poisson likelihood. I have two parameters
and in most cases optim() does a fine job of getting the minima. I am
simulating my data based on pre specified parameters, so I know what I
should be getting. However when my true parameters fall in a particular
range, optim() gives
2010 Jul 22
1
function return
I am sorry if this question is vague or uninformed. I am just
learning R and struggling. I am using the book Hierarchical Modeling
and Inference in Ecology and they provide examples of R code. I have
the following code from the book but when I run it I don't get any
output. I cannot get the values of 'out' to show up. Basically, I
just want to see my estimates for b0,
2020 May 18
3
dbinom link
In principle a good idea, but I'm not sure the whereabouts of Catherine Loader are known at this point. Last peeps from her on the net seem to be about a decade old.
.pd
> On 18 May 2020, at 10:31 , Abby Spurdle <spurdle.a at gmail.com> wrote:
>
> This has come up before.
>
> Here's the last time:
> https://stat.ethz.ch/pipermail/r-devel/2019-March/077478.html
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
2023 Dec 02
1
Try reproduce glmm by hand
Dear all,
In order to be sure I understand glmm correctly, I try to reproduce by
hand a simple result. Here is a reproducible code. The questions are in
_________________
Of course I have tried to find the solution using internet but I was not
able to find a solution. I have also tried to follow glmer but it is
very complicated code!
Thanks for any help.
Marc
# Generate set of df with nb
2020 May 18
2
dbinom link
FWIW the link from ?dbinom to the Loader paper on Binomials is broken but the paper seems to be
available here: https://octave.1599824.n4.nabble.com/attachment/3829107/0/loader2000Fast.pdf
Roger Koenker
r.koenker at ucl.ac.uk<mailto:r.koenker at ucl.ac.uk>
Honorary Professor of Economics
Department of Economics, UCL
Emeritus Professor of Economics
and Statistics, UIUC
[[alternative
2018 Mar 13
2
importing namespaces from base packages
On Mon, Mar 12, 2018 at 2:18 PM, Martin Maechler <maechler at stat.math.ethz.ch>
wrote:
> [...]
> Is that so? Not according to my reading of the 'Writing R
> Extensions' manual, nor according to what I have been doing in
> all of my packages for ca. 2 years:
>
> The rule I have in my mind is
>
> 1) NAMESPACE Import(s|From) \
>
2008 May 13
1
Likelihood between observed and predicted response
Hi,
I've two fitted models, one binomial model with presence-absence data
that predicts probability of presence and one gaussian model (normal or
log-normal abundances).
I would like to evaluate these models not on their capability of
adjustment but on their capability of prediction by calculating the
(log)likelihood between predicted and observed values for each type of
model.
I found
2019 Jul 08
2
Salvar los plots a alta resolución la vez de incluirlos en documento
Buenas!
Supongo que será fácil, pero se me está haciendo difícil.
Tengo un documento Rmarkdown en RStudio en el que escribí lo que me
pidieron, que me lo piden en formato MS Word. Markdown lo saca
decentemente, pero me temo que no tan decente del todo las imágenes. Quiero
que, además de salir las imágenes incrustadas en los respectivos chunks,
también salve automáticamente la imágen en archivos a
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
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)
--
2007 Oct 24
1
vectorized mle / optim
Hi the list,
I would need some advice on something that looks like a FAQ: the
possibility of providing vectors to optim() function.
Here is a stupid and short example summarizing the problem:
-------------------------------- example 1 ------------ 8<
----------------------
library(stats4)
data <- rnorm(100,0,1)
lik1 <- function(m, v, data) {
N <- length(data)
lik.mean <-
2006 Jul 04
1
problem getting R 2.3.1 svn r38481 to pass make check-all
Hi,
I noticed this problem on my home desktop running FC4 and again on my
laptop running FC5. Both have previously compiled and passed make
check-all on 2.3.1 svn revisions from 10 days ago or so. On both these
machines, make check-all is consistently failing (4 out of 4 attempts on
the FC 4 desktop and 3 out of 3 on the FC 5 laptop) in the
p-r-random-tests tests. This is with both default
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
2008 Sep 23
4
Proper power computation for one-sided binomial tests.
Hi, I trying to determine the best way to compute the power for a
one-sample one-sided binomial test. Specifically I need to sample a
population of individuals and ask whether a sample rate of 0% is
compatable with a minimum threshold of 3% and how many samples are needed.
I have made use of power.prop.test but I am not sure if a) that is the
correct (or best) function to use and b) if the