Displaying 20 results from an estimated 10000 matches similar to: "transform normally distributed random terms to gamma distributed random terms"
2009 Sep 04
3
Applying qqmath using gamma distribution...
Hello ALL!
Can anyone tell me how to specify qqmath() function with distribution
qgamma?
In help it is bit vague how to pass shape and scale parameters for gamma.
Thank you in advance. Best,
PM
2013 Jun 22
1
Superpose two QQ-plots (gamma distribution) with, lattice function qqmath()
David, Duncan,
> Hi
>
> Following on David's rate argument
>
> try (with modifications of pch and grid)
>
> rate <- 1/4
> shape = 8
> rate = c(rep(1/4,100),rep(1/3,100))
I don't think the problem is related to the rate argument, which can
well be vectorized, as is the case for a number of arguments in distrib
functions in R (note that you are redefining it
2008 Jul 07
4
Plot Mixtures of Synthetically Generated Gamma Distributions
Hi,
I have the following vector
which is created from 3 distinct distribution (three components) of gamma:
x=c(rgamma(30,shape=.2,scale=14),rgamma(30,shape=12,scale=10),rgamma(30,shape=5,scale=6))
I want to plot the density curve of X, in a way that it shows
a distinct 3 curves that represent each component.
How can I do that?
I tried this but doesn't work:
lines(density(x))
Please
2009 Sep 17
2
QQ plotting of various distributions...
Hello!
I am trying with this question again:
I would like to test few distributional assumptions for some behavioral
response data. There are few theories about true distribution of those
data, like: normal, lognormal, gamma, ex-Gaussian
(exponential-Gaussian), Wald (inverse Gaussian) etc. The best way would
be via qq-plot, to show to students differences. First two are trivial:
qqnorm(dat$X)
2006 Jun 30
5
median of gamma distribution
Doese anyone know a R function to find the median of a gamma distribution?
[[alternative HTML version deleted]]
2001 Sep 06
1
RFC: d/p/q/rgamma
dgamma and friends in S are documented as
dgamma(x, shape, rate=1)
pgamma(q, shape, rate=1)
qgamma(p, shape, rate=1)
rgamma(n, shape, rate=1)
whereas R has
dgamma(x, shape, scale=1, log = FALSE)
pgamma(q, shape, scale=1, lower.tail = TRUE, log.p = FALSE)
qgamma(p, shape, scale=1, lower.tail = TRUE, log.p = FALSE)
rgamma(n, shape, scale=1)
Note the use of rate vs scale. Indeed, as both S and
2009 Nov 10
1
Generate Random Draw from Gamma Distribution Re: Monte Carlo Simulation in R...
Exactly! Thanks, Duncan.
Let me re-phrase me question like this:
1) X_i values are independent Gammas, with the shape 0.067 and scale 0.008
2) Min(X)=1 and Max(X)=85
3) SUM(X)=2000
4) Do I also have to define the number of draws? if yes, it could be 250.
Based on these restrictions, I want to generate random draw. I'm wondering
how I can do this in R. Thanks.
Garry
On Tue, Nov 10, 2009
2005 Jul 27
7
gamma distribution
Hi R Users
This is a code I wrote and just want to confirm if the first 1000 values are raw
gamma (z) and the next 1000 values are transformed gamma (k) or not. As I get
2000 rows once I import into excel, the p - values beyond 1000 dont look that
good, they are very high.
--
sink("a1.txt");
for (i in 1:1000)
{
x<-rgamma(10, 2.5, scale = 10)
y<-rgamma(10, 2.5, scale = 10)
2001 Oct 21
3
generating a gamma random variable
Dear R People,
This question has nothing to do with R directly, but it is a simulation
question. I need to generate a random variable distributed as
gamma(\alpha,\beta), with the additional proviso that it must be a
function of random variable(s) which do not depend on \alpha, \beta. In
this case, I have \alpha = (T-1)/2, where T is a positive integer.
So, it seems reasonable to first simulate
2009 Jan 26
1
Goodness of fit for gamma distributions
I'm looking for goodness of fit tests for gamma distributions with large data
sizes. I have a matrix with around 10,000 data values in it and i have
fitted a gamma distribution over a histogram of the data.
The problem is testing how well that distribution fits. Chi-squared seems to
be used more for discrete distributions and kolmogorov-smirnov seems that
large sample sizes make it had to
2010 Jun 16
2
Fitting Gamma distribution
I'm looking for goodness of fit tests for gamma distributions with large data
sizes and for different data.
I have a matrix with around 4.000 data values in it and i have fitted a
gamma distribution with "fitdistr".
You can see the example:
> fitdistr(corpo,"gamma",lower=0.001)
Errore in optim(x = c(5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000,
5000, :
2010 Mar 19
1
Gamma parametrization
Dear R users,
?rgamma gives me :
rgamma(n, shape, rate = 1, scale = 1/rate)
rate: an alternative way to specify the scale.
The Gamma distribution with parameters ‘shape’ = a and
‘scale’ = s has density
f(x)= 1/(s^a Gamma(a)) x^(a-1) e^-(x/s)
Should I understand that scale=1/rate ? Is it written somewhere ?
Then
2009 Dec 11
2
Regularized gamma function/ incomplete gamma function
Dear all,
I would be very grateful if you could help me with:
Given the regularized gamma function Reg=int_0^r (x^(k-1)e^(-x))dx/int_0^Inf (x^(k-1)e^(-x))dx ; 0<r<Inf (which is eventually the ratio of the
Incomplete gamma function by the gamma function), does anyone know of a package in R that would evaluate the derivative of the inverse of Reg with respect to k? I am aware that the
2007 Oct 07
1
a function to compute the cumulative distribution function (cdf) of the gamma
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20071006/065906cc/attachment.pl
2007 May 18
1
Inverse gamma
Hi, All:
assume I need to generate X from inverse gamma with parameter (k, beta).
should I generate from Y from gamma(-k, beta),
then take X=1/Y?
Thanks
pat
2008 Feb 21
1
Function for linear mixed model with gamma-distributed random effects?
Hi,
I'm new to R and am hoping someone might be able to help with the following lme problem.
I am trying to fit an ellipse equation to some spatial human factors data, varying the major and minor axes randomly and specifying an exp~ variogram for errors. Using normally-distributed random effects produces some -ve minor/major axes. I am hoping to be able to specify a gamma distribution to
2003 Nov 24
1
mle in the gamma model
Dear [R]-list,
I'm looking for a classic equivalent of the wle.gamma function (library
wle) that estimate robustly the shape and the scale parameters of gamma
data.
I have a vector of iid gamma rv :
>data=rgamma(100,shape=10,scale=3)
and a vector of their weights:
>weights=c(rep(.5/70,70),rep(.25/20,20),rep(.25/10,10))
and want to estimate the scale and shape of the gamma
2007 Jul 18
1
random number generation
Hi there,
I am relatively new user of R. I need to generate random number following
Gamma distribution with mean 14 und st.dev 3. I read the help-text but I can
not understand it well.
Regards,
Azizi
[[alternative HTML version deleted]]
2009 Mar 17
3
R does not compile any more on FreeBSD 8.0-CURRENT
On a recent FreeBSD 8.0-CURRENT (i386) building R (any version) breaks
with the following messages:
----------------------------------------------------------------------
[...snip...]
gcc -std=gnu99 -I. -I../../src/include -I../../src/include
-I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c wilcox.c -o wilcox.o
gcc -std=gnu99 -I. -I../../src/include -I../../src/include
-I/usr/local/include
2003 Sep 30
3
fitdistr, mle's and gamma distribution
Dear R Users,
I am trying to obtain a best-fit analytic distribution for a dataset
with 11535459 entries. The data range in value from 1 to 300000000. I
use: fitdistr(data, "gamma") to obtain mle's for the parameters.
I get the following error:
Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) :
non-finite finite-difference value [1]
And the following warnings: