Displaying 20 results from an estimated 1000 matches similar to: ".Internal for functions in distn.R"
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
1997 Jun 25
3
R-alpha: lbeta, ctrl-C and crashes
1. lbeta and beta do not work properly: lbeta returns its first
argument and beta gives the lbeta result.
In names.c lines 245-6, the codes for these should be 2 and 3 instead
of 1 and 2
2. crtl-C does not work (except the first time) on Red Hat elf Linux
(which has many many other problems as well) nor on the previous
version of Linux for Amiga. It worked on Slackware aout Linux and now
works
1997 Jun 25
3
R-alpha: lbeta, ctrl-C and crashes
1. lbeta and beta do not work properly: lbeta returns its first
argument and beta gives the lbeta result.
In names.c lines 245-6, the codes for these should be 2 and 3 instead
of 1 and 2
2. crtl-C does not work (except the first time) on Red Hat elf Linux
(which has many many other problems as well) nor on the previous
version of Linux for Amiga. It worked on Slackware aout Linux and now
works
2023 Aug 27
1
Issue with gc() on Ubuntu 20.04
On Sun, 27 Aug 2023 19:54:23 +0100
John Logsdon <j.logsdon at quantex-research.com> wrote:
> Not so although it did lower the gc() time to 95.84%.
>
> This was on a 16 core Threadripper 1950X box so I was intending to
> use library parallel but I tried it on my lowly windows box that is
> years old and got it down to 88.07%.
Does the Windows box have the same version of R
2023 Aug 27
1
Issue with gc() on Ubuntu 20.04
Folks
I have come across an issue with gc() hogging the processor according to
Rprof.
Platform is Ubuntu 20.04 all up to date
R version 4.3.1
libraries: survival, MASS, gtools and openxlsx.
With default gc.auto options, the profiler notes the garbage collector
as self.pct 99.39%.
So I have tried switching it off using options(gc.auto=Inf) in the R
session before running my program using
2009 Jul 09
2
Improvement of [dpq]wilcox functions
Hi,
I believe I have significantly improved [dpq]wilcox
functions by implementing Harding's algorithm:
Harding, E.F. (1984): An Efficient, Minimal-storage Procedure
for Calculating the Mann-Whitney U, Generalized U and Similar
Distributions, App. Statist., 33, 1-6
Results on my computer show (against R-2.9.1):
> system.time( dwilcox( 800, 800, 80) )
user system elapsed
0.240
2010 Nov 09
2
simulation from pareto distn
Dear all,
I am trying to simulate from truncated Pareto distribution. I know there is
a package called PtProcess for Pareto distribution...but it is not for
truncated one. Can anyone please help me with this?
Thanks in advance.
Cassie
[[alternative HTML version deleted]]
2006 Jan 17
1
how can i locate the source code of a module quickly?
I have dowloaded the Source Code of R,and I want to know the process of
chi-sqared test,but how can I found it?
[[alternative HTML version deleted]]
2008 Apr 13
0
R project
Hi,I am currently doing a project in which we are to investigate the size and power of three different one sample tests over three different distributions using a number of different sample sizes and values for mu1. I have written a function and was trying to get my answer for each test into the right position in an array so the output is the power of each combination of test, distribution, sample
2006 Apr 13
2
contribution offer: df() for non-centrality != 0
Hi R-devels,
I noticed that for the scheduled R 2.3.0,
there is still no function df() for
non-centrality != 0.
Easter is quickly approaching, so as my little
gift, I would like to offer you some code to fill
this gap:
After excluding some "unusual" cases,
it amounts to differentiating the corresponding
function pnf() --- which in turn leads to the
function dnbeta() already available
2011 Aug 26
2
How to generate a random variate that is correlated with a given right-censored random variate?
Hi,
I have a right-censored (positive) random variable (e.g. failure times subject to right censoring) that is observed for N subjects: Y_i, I = 1, 2, ..., N. Note that Y_i = min(T_i, C_i), where T_i is the true failure time and C_i is the censored time. Let us assume that C_i is independent of T_i. Now, I would like to generate another random variable U_i, I = 1, 2, ..., N, which is
2008 Oct 22
0
ad.test exponential distribution
Hi,
I'm trying to use ad.test or ad2.test to test whether a given data set is
exponential. I see that one of the function inputs is "distn", but I try
"exponential" and 5 other variants, but I still get the error message:
ad.test(test2, distn="exponential", fit=list(estimate = 0.167685), H=NA,
sim=100)
Error in ad.test(test2, distn = "exponential",
2020 May 22
0
round() and signif() do not check argument names when a single argument is given
Hi,
I was told to send this to the -devel list instead of posting to bugzilla.
When round our signif are called with a single named argument, R does not
check the name and runs the function with that named argument directly as
the first argument, using 0.0 or 6.0 (6 in the case of signif) for the
second argument. Not checking the argument name is at odds with how all
other primitive functions
2003 Jul 16
2
Density function for non-central t distribution
Hi,
I've written some C code for density evaluation of the non-central t distribution. It works
with the R-1.7.1 source code if placed in the src/nmath directory and after appropriate
changes are made to Makefiles, to the dt function in src/library/base/R/distn.R etc.
I haven't read a lot of R source code so it may need some R-ification, but I've tried to use the
dt.c file as a
2017 Sep 27
1
logic ops with zero-extent raw vectors
Hi,
there was a change concerning logical operations about a year ago:
https://github.com/wch/r-source/commit/9e19d3e3dd5f657b5cfefe562bdd7ede2e2b8786
It's related to a discussion on this list:
https://hypatia.math.ethz.ch/pipermail/r-devel/2016-September/073068.html <https://hypatia.math.ethz.ch/pipermail/r-devel/2016-September/073068.html>
A change in logic.c:134 influences the
2010 Jun 23
1
A question about R2Winbugs
Dear R users:
I was trying to fit a HMM with mixture of Gaussian into the dataset, and I
tried to implement it by R2Winbugs. But I got the following errer.
*
Error in FUN(X[[1L]], ...) :
.C(..): 'type' must be "real" for this format*
Does anybody know what's the problem? Does R2Winbugs accept some matrix as
inits? I would really appreciate your help. Thank you very much.
2016 Mar 18
1
formatting of complex matrix
While working on the printing code, my colleague Zbyn?k ?lajchrt noticed that complex matrixes are sometimes misaligned:
> { matrix(1i,2,13) }
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[1,] 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i
[2,] 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i
(the values in the last four columns
2006 Mar 08
1
power and sample size for a GLM with Poisson response variable
Craig, Thanks for your follow-up note on using the asypow package. My
problem was not only constructing the "constraints" vector but, for my
particular situation (Poisson regression, two groups, sample sizes of
(1081,3180), I get very different results using asypow package compared
to my other (home grown) approaches.
library(asypow)
pois.mean<-c(0.0065,0.0003)
info.pois <-
2006 Feb 06
3
power and sample size for a GLM with poisson response variable
Hi all,
I would like to estimate power and necessary sample size for a GLM with
a response variable that has a poisson distribution. Do you have any
suggestions for how I can do this in R? Thank you for your help.
Sincerely,
Craig
--
Craig A. Faulhaber
Department of Forest, Range, and Wildlife Sciences
Utah State University
5230 Old Main Hill
Logan, UT 84322
(435)797-3892