Displaying 20 results from an estimated 3000 matches similar to: "Re: [R] Strange means of numbers drawn from rpois (PR#729)"
2000 Nov 08
1
Re: [R] Strange means of numbers drawn from rpois (PR#730)
On 8 Nov 2000, Peter Dalgaard BSA wrote:
>Done...
Great!
>(This kind of behaviour has been observed on various platforms and
>various compilers, sometimes getting stuck around 15.15 and sometimes
>around 14.5. Others report no problems. Very strange. I've seen one
>case where it apparently shifted from one regime to the other.)
Yes, it does that here too.... The following is
2000 Nov 08
3
Strange means of numbers drawn from rpois
Dear all,
I think I must be going crazy.... If I do
> mean(rpois(1000000, 14))
I get:
[1] 13.50420
and again:
> mean(rpois(1000000, 14))
[1] 13.49896
> mean(rpois(1000000, 14))
[1] 13.50161
> mean(rpois(1000000, 15))
[1] 14.49250
> mean(rpois(1000000, 15))
[1] 14.49897
> mean(rpois(1000000, 14.5))
[1] 13.99689
> mean(rpois(1000000, 14.5))
[1] 13.9963
This was on a
platform
2000 Nov 08
0
Re: [R] Strange means of numbers drawn from rpois (PR#730)
Kjetil Kjernsmo <kjetil.kjernsmo@astro.uio.no> writes:
> On 8 Nov 2000, Peter Dalgaard BSA wrote:
>
> >> > range(sapply(1:2000, function(n) mean(rpois(10000, c(15,15+1e-8)))))
> >> [1] 14.8692 15.1200
> >
> >AHA! Spotted, I think.
>
> Wow! Great, that was fast!
>
> >It is possible to return from rpois in step N,
> >in which case
2000 Feb 15
1
rpois gives a large number repeatedly (PR#439)
Full_Name: Kjetil Kjernsmo
Version: 0.65.1
OS: Digital UNIX 4.0
Submission from: (NULL) (129.240.28.172)
I'm experiencing problems with rpois. Occasionally, it draws a very high
number.
Yeah, I know, this is statistics, things like that does happen, but this really
strange because a poisson distribution with a parameter of 3 shouldn't see the
number 1932 very often, but the same,
2000 Jan 14
2
Matrix output from drawing functions
Dear all,
I'm a bit confused about the output from functions that generates random
values, e.g. rpois. I'm using 0.65.1 on Digital UNIX alphaev6.
If I say
> rpois(10,5)
output is not unexpectedly:
[1] 4 6 5 7 6 5 2 2 5 3
but I figured that if I go:
> rpois(10,1:10)
I would get a 10x10 matrix as output, with random values for each of
the vector elements in the row vectors, but
2000 Apr 30
2
rpois hangs (PR#530)
Full_Name: Kjetil Kjernsmo
Version: Version 1.0.0
OS: osf1
Submission from: (NULL) (129.240.28.227)
Dear all,
I have come across another really strange bug in rpois.
If I do
> rpois(1, 1000000 * rpois(1, 10000))
sometimes it hangs, and hangs...
On my XP1000 alphaev6 workstation, it seems to happen more
frequently than on other machines. I started a session on an older
computer, and from
2001 Jun 25
5
Trouble compiling R-1.3.0 under Tru64
Dear all,
I have some difficulty getting R-1.3.0 to run on the alpha, with osf4.0e
(Tru64, or whatever they call it... :-) ).
configure reports the following configuration:
R is now configured for alphaev6-dec-osf4.0e
Source directory: .
Installation directory: /astro/local
C compiler: gcc -mieee -g -O2
C++ compiler: c++ -g -O2
FORTRAN
2001 Jun 25
5
Trouble compiling R-1.3.0 under Tru64
Dear all,
I have some difficulty getting R-1.3.0 to run on the alpha, with osf4.0e
(Tru64, or whatever they call it... :-) ).
configure reports the following configuration:
R is now configured for alphaev6-dec-osf4.0e
Source directory: .
Installation directory: /astro/local
C compiler: gcc -mieee -g -O2
C++ compiler: c++ -g -O2
FORTRAN
2000 Aug 04
1
Inverting matrix...
Dear all,
Either I'm being totally blind now (as you know, the eyes are the first
thing that is blinded :-)), or something is missing in
"An Introduction to R". The section heading of section 5.7.1 is
"Multiplication, inversion and solving linear equations", and since I was
looking for the canonical way of inverting a matrix, this was the place to
look. However, I found
2001 Nov 16
1
$name vs. [["name"]]
Dear all,
I have been away for a month, but some time ago, I noted something that
was very surprising to me. I think this example illustrates it well:
> test <- data.frame(col1 = c(1,2), col2=c(3, 4))
> test
col1 col2
1 1 3
2 2 4
> apply(test, 1, function(x) browser())
Called from: FUN(newX[, i], ...)
Browse[1]> x$col1
NULL
Browse[1]> x[["col1"]]
[1] 1
2001 Feb 15
2
Reading single precision floats from binary file
Dear all,
I have a few files with binary data written by a C program a friend wrote.
I allready have program to read these files, Thomas Lumley and Prof Brian
D Ripley was kind enough to respond to a question to this list earlier
with some code that works perfectly, so this is really no problem, it is
more out curiousity.
Most of my files consists of 40000 single precision floats, and I figured
2000 May 23
1
Random number generation problem (PR#554)
Full_Name: Kjetil Kjernsmo
Version: 1.0.1
OS: osf1
Submission from: (NULL) (129.240.28.227)
Hello!
I'm getting strange numbers from a random number generation
function again. I was wondering if it could be the same problem
as I reported in (PR#439).
I'm using the functions (some comments deleted for brevity):
qamp <- function(p, type=c("point", "nolens"))
{
2001 Aug 02
1
Package GSS for interpolation in more than 2D?
Dear all,
There has been some time since I asked about interpolation in higher (>2)
dimensions, and I must admit I failed to write a function to do this
myself the last time, but eventually ended up doing it in MATLAB. I tried
to translate the MATLAB code, but MATLAB code is so much more opaque than
R (S) code, so I failed that too, mainly because I could only get one
MATLAB session, I would
2001 Aug 08
1
Strategy for creating a palette...?
Dear all,
I'm generally not a big fan of GUIs, but I have just discovered one thing
where a GUI would be a nice thing: creating color palettes.
I'm creating an "image", for transparencies for a lecture I'm giving, so
this is going to look great... :-) What I'm out for, is to make green
tones and red tones, and a relatively sharp break between them. This break
will
2000 Nov 26
1
Problem with NAs using chisq.test() (PR#748)
Full_Name: Kjetil Kjernsmo
Version: 1.1.1.1 (patched the rpois :-))
OS: osf4.0e
Submission from: (NULL) (129.240.28.227)
Dear all,
I have just gotten through a debugging session of my code, being confused
for a few days. I sent what I thought was a straightforward matrix to
chisq.test() and once in a while got the error message:
> chisq.test(t2)
Error in chisq.test(t2) : missing value where
2000 Jun 24
1
Garbage Collecting
Dear all,
Me and the Garbage Collector doesn't understand each other...
I'm on R-1.0.1 (I have requested an upgrade to the right local people), an
osf1 system with an alphaev6 CPU. I have fair amounts of memory to use,
but it seems to be used up pretty fast nevertheless.
I'm now trying to see what the garbage collector does, I have inserted a
gc(v=T)
call at a spot in my code.
I
2000 May 07
1
Problem with match.arg() (PR#536)
Full_Name: Kjetil Kjernsmo
Version: Version 1.0.0
OS: osf1
Submission from: (NULL) (129.240.28.227)
Hello again!
This is a follow-up to my message on R-help about a problem with match.arg()
I have a little more on the topic, but not much really.
First, it was not entirely true what I wrote in r-help that I call match.arg()
in my ramp(), because ramp() just calls qamp() with runif() as
2001 Jun 04
1
2D convolution
Dear all,
I have an image that I need to filter, and so I'm looking for a method to
convolve it with a matrix. If I understood the docs for convolve
correctly, it only works in 1D (and I have tried to convolve, it didn't
look good).
So, I wondered if anybody have implemented 2D convolution in R, or have
any good advices to share (beyond having a look at mvfft), before I go
hacking?
2000 Feb 13
1
Underflow warnings?
Dear all,
I'm a bit concerned about underflow problems. Such problems typically
occur when two almost equal numbers are subtracted. I was wondering if R
has any mechanisms for warning users about potential problems, or if any
policy has been developed?
To check, I just did:
> 1.0000000000000001 - 1
[1] 0
> 1.000000000000001 - 1
[1] 1.110223e-15
> 1.00000000000001 - 1
[1]
2001 Apr 30
1
Some loglog density plot
Dear all,
A looong time ago, Witold Eryk Wolski asked here why there wasn't a
log="xy" parameter to the hist() function
<URL:http://www.R-project.org/nocvs/mail/r-help/2001/0267.html>, and
Prof. Ripley responded that a loglog histogram does not make much sense,
and that one should use a better density estimate if one seeks to plot
log density.
I understand the point and I