similar to: unif_rand() and exp_rand()

Displaying 20 results from an estimated 1200 matches similar to: "unif_rand() and exp_rand()"

2002 Aug 27
2
Peter Dalgaard's book availability....
Dear List, Does anyone know when will be available Peter Dalgaard's book: "Introductory Statistics with R" ?. According to Amazon: "This item will be published on August 15, 2002", but it continues unpublised. Thanks, Carlos Ortega. _______________________________________________________________ Yahoo! Messenger Nueva versi?n: Webcam, voz, y mucho m?s ?Gratis!
2002 Aug 21
0
Tenure track positions in Statistics
This email is forwarded on behalf of Dr. Herbert Gaskill. Please do not reply to me but direct enquiries to Ms Wanda Heath <wanda at math.mun.ca> or Dr. Herbert Gaskill <head at math.mun.ca>. Apologies for cross-posting. MEMORIAL UNIVERSITY OF NEWFOUNDLAND St. John's, Newfoundland, Canada A1C 5S7 www.math.mun.ca DEPARTMENT OF MATHEMATICS AND STATISTICS The Department of
2003 Oct 31
2
Summing elements in a list
Hi, Suppose that I have a list where each component is a list of two matrices. I also have a vector of weights. How can I collapse my list of lists into a single list of two matrices where each matrix in the result is the weighted sum of the corresponding matrices. I could use a loop but this is a nested calculation so I was hoping there is a more efficient way to do this. To help clarify,
2019 Mar 22
1
Status of R_unif_index
Dear List, section "6.3 Random number generation" of WRE [1] lists unif_rand(), norm_rand() and exp_rand() as the interface to R's RNG. Now R_ext/Random.h also has double R_unif_index(double); Can this be also treated as an official API function that may be called from a package? Thanks Ralf [1] https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Random-numbers --
2004 Jun 15
2
About function "unif_rand()"
hello, everybody, I met a problem that I want to generate a random uniform number by using function with c interface. What I found is only "unif_rand()", but its range is [0,1]. How can I create a uniform random variable by using a function with c interface. Who can tell me what function it is and how to use? I will appreciate for it very much. Thanks in advance! xiaotong wang
1999 Jul 23
1
lapply( *, names) -- bug ?!
This came on S-news The more direct test being sapply(c(a=1,b=2), names) Problem: R ("all" versions) behaves the same as S+5.1, which is wrong IMO. {since some might disagree, I didn't yet post to R-bugs ..} ------- Start of forwarded message ------- Date: Thu, 22 Jul 1999 23:14:57 -0230 From: "Paul Y. Peng" <ypeng@math.mun.ca> To: s-news
2003 Jan 10
6
R-1.6.2 is released
I've rolled up R-1.6.2.tgz a short while ago. This is a minor upgrade, fixing an assortment of bugs. You can get it from the developer site at http://cvs.r-project.org/pub/CRAN/src/base/R-1.6.2.tgz or wait for it to be mirrored at a CRAN site near you. Binaries for various platforms will appear in due course. There is also a version split for floppies, but due to the inclusion of
2003 Jan 10
6
R-1.6.2 is released
I've rolled up R-1.6.2.tgz a short while ago. This is a minor upgrade, fixing an assortment of bugs. You can get it from the developer site at http://cvs.r-project.org/pub/CRAN/src/base/R-1.6.2.tgz or wait for it to be mirrored at a CRAN site near you. Binaries for various platforms will appear in due course. There is also a version split for floppies, but due to the inclusion of
2004 Mar 23
1
R equivilant to RAND_MAX in C
Hello, I have some C code that I'm interfacing to R using the .C calling interface. Currently the C code uses the rand() function from the GNU C library to generate random numbers. Since I need the random numbers in a range from 0 to a (where a is an integer) I use the RAND_MAX macro as (int)(rand() * (float)(*nobs-1) / (RAND_MAX+1.0)) (taken from the rand() manpage) However, since I have
2010 Jan 28
1
Problem with R math library.
Hello. I've been working on my OCaml-R binding, and I quite pleased to see that it is functional, though far from being perfect or polished. You can find the gitweb webpage and the interface documentation at http://yziquel.homelinux.org/gitweb/?p=ocaml-r.git;a=tree http://yziquel.homelinux.org/topos/api/ocaml-r/index.html I'm having unexpected trouble with the math library, though.
2002 Oct 22
1
Re: [S] Draw ellipses in S-PLUS or R?
Many thanks to Andy Liaw for quickly reminding me of "ellipse" package in CRAN. It is apparently what I wanted. Not sure whether it will work in S-PLUS or not. But I will give it a try. Thank you. Paul. > > Have you checked CRAN? There's an "ellipse" package on CRAN for quite a > while. > > Andy > > > -----Original Message----- > > From:
2002 Jan 24
2
random number generation issues with r and compiled C code
Dear People, I have been writing a simulation routine that is currently entirely written in c++. I've been using the R standalone math library to give me random number generation for this. However, I have had to set the seed myself, and I am using set_seed(time(NULL), clock) for every call to unif_rand(). However, this works really badly. The random numbers aren't uniform at all. Does
2008 Jul 03
1
GetRNGstate and PutRNGstate
Hi, I've got a simulation function, written in C and called from R, that uses the R random number functions. It's not a very complicated simulation - 280 lines total, with the main function (the one called with .C) repeatedly calling another function, with multiple calls to unif_rand() in both functions. At the beginning of the main function I call GetRNGstate(), and the last thing I do
2018 Sep 19
4
Bias in R's random integers?
Hi Duncan-- Nice simulation! The absolute difference in probabilities is small, but the maximum relative difference grows from something negligible to almost 2 as m approaches 2**31. Because the L_1 distance between the uniform distribution on {1, ..., m} and what you actually get is large, there have to be test functions whose expectations are quite different under the two distributions.
2018 Sep 19
2
Bias in R's random integers?
It doesn't seem too hard to come up with plausible ways in which this could give bad results. Suppose I sample rows from a large dataset, maybe for bootstrapping. Suppose the rows are non-randomly ordered, e.g. odd rows are males, even rows are females. Oops! Very non-representative sample, bootstrap p values are garbage. David On Wed, 19 Sep 2018 at 21:20, Duncan Murdoch <murdoch.duncan
2019 Mar 01
1
issue with sample in R 3.6.0.
Hello, I think there is an issue in the sampling rejection algorithm in R 3.6.0. The do_sample2 function in src/main/unique.c still has 4.5e15 as an upper limit, implying that numbers greater than INT_MAX are still to be supported by sample in base R. Please review the examples below: set.seed(123) max(sample(2^31, 1e5)) [1] 2147430096 set.seed(123) max(sample(2^31 + 1, 1e5)) [1] 1
2018 Sep 19
2
Bias in R's random integers?
A quick point of order here: arguing with Duncan in this forum is helpful to expose ideas, but probably neither side will convince the other; eventually, if you want this adopted in core R, you'll need to convince an R-core member to pursue this fix. In the meantime, a good, well-tested implementation in a user-contributed package (presumably written in C for speed) would be enormously
2018 Sep 19
2
Bias in R's random integers?
No, the 2nd call only happens when m > 2**31. Here's the code: (RNG.c, lines 793ff) double R_unif_index(double dn) { double cut = INT_MAX; switch(RNG_kind) { case KNUTH_TAOCP: case USER_UNIF: case KNUTH_TAOCP2: cut = 33554431.0; /* 2^25 - 1 */ break; default: break; } double u = dn > cut ? ru() : unif_rand(); return floor(dn * u); } On Wed, Sep
2003 Apr 01
2
predict in Pspline package (PR#2714)
To whom it may concern, I don't know whether this is really a bug with the Pspline package or only a problem with my installation. Things work fine in Linux but not in Mac OS X (Darwin). Both system run the latest public versions of R and Pspline. predict.smooth.Pspline produces only NaN instead of predicted values when norder>2: > library (Pspline) > tt <- seq
2009 Nov 13
2
random numbers in C
I need some random numbers in my C program. Here a small example: //////////////////////////////////////////////////////////////////////////////// #include <R.h> void rand (int* n) { int len = *n; for (int i = 0; i < len; i++) Rprintf("%1.5f ", unif_rand()); } dyn.load("rand.dll") .C("rand", as.integer(10)) dyn.unload("rand.dll")