Displaying 20 results from an estimated 800 matches similar to: "Incomplete Gamma Functions and GammaDistribution Doc errata."
1998 Mar 26
1
R-beta: problem with locfit
I installed the locfit package under Linux (gcc 2.7.2). Installation
was ok but
> x <- runif(200)
> y.compl <- 10*x*x*rgamma(200,3)
> med.y <- median(y.compl)
> cens <- ifelse(y.compl<=med.y,1,0)
> y <- cens * y.compl + (1-cens)*med.y
> library(locfit)
> m <- locfit(y~x,cens=cens,family="gamma")
/usr/local/src/R-0.61.1/bin/R.binary: can't
2006 Aug 07
1
mathematica -> r (gamma function + integration)
Dear R-list,
I try to transform a mathematica script to R.
#######relevant part of the Mathematica script
(* p_sv *)
dd = NN (DsD - DD^2);
lownum = NN (L-DD)^2;
upnum = NN (H-DD)^2;
low = lownum/(2s^2);
up = upnum/(2s^2);
psv = NIntegrate[1/(s^NN) Exp[-dd/(2s^2)]
(Gamma[1/2,0,up] + Gamma[1/2,0,low]),{s,sL,sH},
MinRecursion->3];
PSV = psv/Sqrt[2NN];
Print["------------- Results
2004 Oct 22
3
pgamma discontinuity (PR#7307)
Full_Name: Morten Welinder
Version: 2
OS: Solaris/space/gcc2.95.2
Submission from: (NULL) (65.213.85.217)
I changed src/nmath/standalone/test.c to read:
---------------------------------------------------------------------------------
#define MATHLIB_STANDALONE 1
#include <Rmath.h>
#include <stdio.h>
int
main()
{
double x;
for (x = 99990; x <= 100009; x++)
printf
2004 Jun 16
2
erf function documentation
Hi all. I may be wrong, (and often am), but in trying
to determine how to calculate the erf function, the
documentation for 'pnorm' states:
## if you want the so-called 'error function'
erf <- function(x) 2 * pnorm(x * sqrt(2)) - 1
## and the so-called 'complementary error function'
erfc <- function(x) 2 * pnorm(x * sqrt(2),
lower=FALSE)
Should, instead, it read:
2007 Aug 30
2
Incomplete Gamma function
Hello
I am trying to evaluate an Incomplete gamma function
in R. Library Zipfr gives the Igamma function. From
Mathematica, I have:
"Gamma[a, z] is the incomplete gamma function."
In[16]: Gamma[9,11.1]
Out[16]: 9000.5
Trying the same in R, I get
> Igamma(9,11.1)
[1] 31319.5
OR
> Igamma(11.1,9)
[1] 1300998
I know I have to understand the theory and the math
behind it rather
2006 Jul 19
2
Stirling numbers
Hi
anyone coded up Stirling numbers in R?
[I need unsigned Stirling numbers of the first kind]
cheers
Robin
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2007 Feb 27
1
Additional args to fun in integrate() not found?
Hello, fellow Rdicts,
I have the code for the program below. I need to integrate a function
of "x" and "p". I use integrate to integrate over "x" and pass "p" as
an additional argument. "p" is specified and given default value in
the argument list. Still, integrate() cannot read "p", unless I
explicitly insert a numeric value in the
2005 Sep 12
1
fit data with gammadistribution
hello
my data is
data2:2743 4678 21427 6194 10286 1505 12811 2161 6853 2625 14542 694
11491 14924 28640 17097 2136 5308 3477 91301 11488 3860 64114 14334
by calculating
shape<-(mean(data2))^2/var(data2)
scale<-var(data2)/mean(data2)
i get the idea what the parameters of the gammadistribution would be.
but if i try using the method mle() i get stock and i don't know, how to
2006 Jun 26
2
Inverse Error Function
Do any of the R libraries have an implementation of the Inverse Error
Function (Inverse ERF)?
ref:
http://mathworld.wolfram.com/InverseErf.html
http://functions.wolfram.com/GammaBetaErf/InverseErf/
Thanks,
Nathan
[[alternative HTML version deleted]]
2010 Jan 05
4
solving cubic/quartic equations non-iteratively
To R-helpers,
R offers the polyroot function for solving mentioned equations
iteratively.
However, Dr Math and Mathworld (and other places) show in detail how to
solve mentioned equations non-iteratively.
Do implementations for R that are non-iterative and that solve mentioned
equations exists?
Regards, Mads Jeppe
2006 Jun 15
2
Standard Deviation Distribution
I'm having trouble with the standard deviation distribution
as shown on http://mathworld.wolfram.com/StandardDeviationDistribution.html .
(Eric Weisstein references Kenney and Keeping 1951, which I can't check.)
I believe the graphs they show, but when I code the function in R, according to the listed formula,
I get very different graphs.
Would someone please point out my error or tell
2003 Nov 05
1
Fitting a 3-parameter gammadistribution
I have 'grouped' data, that is in the form of:
Interval Median
0-9.9%: -25
10-19.9%: 0
20-29.9%: 3
30-39.9%: 10
40-49.9%: 50
50-59.9%: 200
et cetera
and want to fit a three parameter gamma distribution. Does anyone know of an existing routine for doing this (or something similar)? Any help or comment is much appreciated.
Regards,
M?rten
M?rten
2005 Sep 09
2
test for exponential,lognormal and gammadistribution
hello!
i don't want to test my sample data for normality, but exponential- lognormal-
or gammadistribution.
as i've learnt the anderson-darling-test in R is only for normality and i am
not supposed to use the kolmogorov-smirnov test of R for parameter estimates
from sample data, is that true?
can you help me, how to do this anyway!
thank you very much!
nadja
1999 Apr 10
2
IRIX compile (PR#163)
Full_Name: Tim Middelkoop
Version: 0.64.0
OS: IRIX 6.3 on O2
Submission from: (NULL) (128.119.88.192)
Various IRIX complile issues
src/nmath/pnt.c
IRIX cc does not like double negatives
Makeconf,config.site,etc/Makeconf
f77 pic hack, should change Makeconf.in or other...
change -PIC with -KPIC
enjoy, tim...
===
diff -ru orig/R-0.64.0/src/nmath/pnt.c R-0.64.0/src/nmath/pnt.c
---
2007 Oct 11
1
[Fwd: Re: pt inaccurate when x is close to 0 (PR#9945)]
Here's a contribution from Ian Smith that got bounced from the list.
-------- Original Message --------
Subject: Re: [Rd] pt inaccurate when x is close to 0 (PR#9945)
Date: Thu, 11 Oct 2007 06:02:43 -0400
From: iandjmsmith at aol.com
To: murdoch at stats.uwo.ca
Duncan,
I tried sending the rest of this to R-devel but it was rejected as spam,
hence the personal e-mail.
R calculates the pt
2009 Nov 20
1
Bessel function with large index value
I am looking for a method of dealing with the modified Bessel function
K_\nu(x) for large \nu.
The besselK function implementation of this allows for dealing with
large values of x by allowing for exponential scaling, but there is no
facility for dealing with large \nu.
What would work for me would be an lbesselK function in the manner of
lgamma which returned the log of K_\nu(x) for large
2007 Jun 11
1
Gini coefficient in R
If I use the Ineq library and the Gini function in this way:
>Gini(c(100,0,0,0))
I obtain the result 0.75 instead of 1 (that is the perfect inequality).
I think Gini's formula in Ineq is based on a formula as reported here:
http://mathworld.wolfram.com/GiniCoefficient.html
but in the case of perfect inequality:
x_1=.......=x_n-1 =0
x_n>0
these formula are equal to 1 - 1/n, not to
2003 Aug 06
1
Standard error of standard deviation: bootstrap or theoretical results?
Dear R users,
This is more a statistical question rather than an R question. I'd
appreciate it if you can give me some suggestions.
I have a sample of a time series (sample size 500, fat tail in density). I
am trying to calculate the Standard error of standard deviation of a
sub-block-sample (sample size 250). I take 100 this kind of
sub-block-sample, randomly. For these 100 subsamples, I
2005 May 16
1
branch cuts of atan()
Hi
the following gave me a shock:
> atan(2)
[1] 1.107149
> atan(2+0i)
[1] -0.4636476+0i
>
or, perhaps more of a gotcha:
> atan(1.0001+0i)
[1] -0.7853482+0i
> atan(0.9999+0i)
[1] 0.7853482+0i
>
evidently atan()'s branch cuts aren't where I thought they were.
Where do I look for documentation on this?
--
Robin Hankin
Uncertainty Analyst
National
2006 May 17
3
Off topic --- help in locating a source.
Apologies for the off-topic question; as usual I'm trying to draw
upon the unparalleled knowledge and sagacity of the r-help list.
Please reply off-list if you can help me out.
A collaborator of mine found a formula we need, on sheets which he had
photocopied out of a book, some years ago. He cannot remember which
book (he's getting to be as senile and forgetful as I am, poor
bloke!).