Displaying 20 results from an estimated 10000 matches similar to: "comparing the fit of two (gamma) distributions for aggregated data"
2007 Sep 04
0
ML fit of pareto and lognormal distributions to grouped data
Dear list members,
I have a set of claims data, which are in ranges and the shape of the
distribution is relatively different. I have looked through R help
threads and found out that an ideal way is suggested for the gamma
distribution ML fitting for grouped data.
I just wonder if there is any method that works for lognormal or
pareto distribution?
An example would be:
2007 Feb 27
1
fitting the gamma cumulative distribution function
Hi.
I have a vector of quantiles and a vector of probabilites that, when
plotted, look very like the gamma cumulative distribution function. I
can guess some shape and scale parameters that give a similar result,
but I'd rather let the parameters be estimated. Is there a direct way
to do this in R?
Thanks,
Tim.
week <- c(0,5,6,7,9,11,14,19,39)
fraction <-
2009 May 07
1
data transformation using gamma
Hi R-users,
I have this code to uniformise the data using gamma:
> length(dp1)
[1] 696
> dim(dp1)
[1] 58 12
> dim(ahall)
[1] 1 12
> dim(bhall)
[1] 1 12
> trans_dt <- function(dt,a,b)
+ { n1 <- ncol(dt)
+ n2 <- length(dt)
+ trans <- vector(mode='numeric', length=n2)
+ dim(trans) <- dim(dt)
+ for (i in 1:n1)
+ { dt[,i] <- as.vector(dt[,i])
2006 Sep 01
1
integration problem with gamma function
Dear R-list members,
I have a problem with translating a mathematica script into R. The whole
script is at the end of the email (with initial values for easy
reproduction) and can be pasted directly into R. The problematic part
(which is included below of course) is
<--- Original Mathematica --->
(* p_svbar *)
UiA = Ni (Dsi - 2Di A + A^2)/2;
UiiA = Nii (Dsii - 2Dii A + A^2)/2;
psvbar =
2006 Nov 28
3
ML fit of gamma distribution to grouped data
Hello,
we have a set of biological cell-size data, which are only available as
frequencies of discrete size classes, because of the high effort of
manual microscopic measurements.
The lengths are approximately gamma distributed, however the shape of
the distribution is relatively variable between different samples (maybe
it's a mixture in reality).
Is there any ML fitting (or
2004 Mar 19
3
Incomplete Gamma Functions and GammaDistribution Doc errata.
Hello all,
In the course of trying to implement the CDF of an
InverseGammaDistribution, I have run across the need for an igamma()
function. Several others have needed this function but the answers I
have found so far are not totally clear to me. I'm writing for three
reasons:
1) to present a small error in the docs
2) to clarify the approach we are expected to take
3) to request,for the
2009 Jul 01
1
Plot cumulative probability of beta-prime distribution
Hallo,
I need your help.
I fitted my distribution of data with beta-prime, I need now to plot the
Cumulative distribution. For other distribution like Gamma is easy:
x <- seq (0, 100, 0.5)
plot(x,pgamma(x, shape, scale), type= "l", col="red")
but what about beta-prime? In R it exists only pbeta which is intended only
for the beta distribution (not beta-prime)
This is
2008 Jun 11
2
MLE Estimation of Gamma Distribution Parameters for data with 'zeros'
Greetings, all
I am having difficulty getting the fitdistr() function to return without
an error on my data. Specifically, what I'm trying to do is get a
parameter estimation for fracture intensity data in a well / borehole.
Lower bound is 0 (no fractures in the selected data interval), and upper
bound is ~ 10 - 50, depending on what scale you are conducting the
analysis on.
I read in the
2011 Aug 05
1
Goodness of fit of binary logistic model
Dear All,
I have just estimated this model:
-----------------------------------------------------------
Logistic Regression Model
lrm(formula = Y ~ X16, x = T, y = T)
Model Likelihood Discrimination Rank Discrim.
Ratio Test Indexes Indexes
Obs 82 LR chi2 5.58 R2 0.088 C 0.607
0
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
2003 Dec 04
2
Comparing Negative Binomial Regression in Stata and R. Constants differ?
I looked for examples of count data that might interest the students and
found this project about dropout rates in Los Angeles High Schools. It
is discussed in the UCLA stats help pages for the Stata users:
http://www.ats.ucla.edu/stat/stata/library/count.htm
and
See: http://www.ats.ucla.edu/stat/stata/library/longutil.htm
To replicate those results, I used R's excellent foreign package to
2020 Oct 24
0
Fitting Mixed Distributions in the fitdistrplus package
Dear Charles,
Please, when you have questions about fitdistrplus, contact directly the authors of the package and not R-help.
When fitting non ? standard ? distributions with fitdistrplus, you should define by yourself the density and the cumulative distribution functions, or load a package which define them.
See FAQ for a general example :
2012 Oct 04
2
Help with R Fitting an inverse Gamma
Dear all,
I am new in R and would like to ask for someone's help in understanding
where I go wrong with the following code:
rm(list=ls())
# Required packages
library(MCMCpack)
# Simulated data
set.seed(1)
data = rinvgamma(n=250, shape = 5, scale = 2) + 2
hist(data)
# log-likelihood
ll = function(par){
if(par[1]>0 & par[2]>0 & par[3]<min(data)) return(
2009 Jun 01
1
survreg.distributions() error
Hi there.
I am receiving an unexpected error message when creating a new
distribution for the survreg() function in the survival package. I
understand the survival.distributions() function and have been
following the Cauchy example provided in the help file.
My goal is to use survreg to fit a gamma distribution to interval
censored data.
Here is a simple example of what I'm trying to do.
2011 Sep 19
2
Poisson-Gamma computation (parameters and likelihood)
Good afternoon/morning readers. This is the first time I am trying to run
some Bayesian computation in R, and am experiencing a few problems.
I am working on a Poisson model for cancer rates which has a conjugate Gamma
prior.
1) The first question is precisely how I work out the parameters.
#Suppose I assign values to theta with *seq()*
*theta<-seq(0,1,len=500)*
#Then I try out the
2001 Feb 07
3
Goodness of fit to Poisson / NegBinomial
All,
I have some data on parasites on apple leaves and want to do a
goodness of fit test to a Poisson distribution. This seems to
do it:
mites <- c(rep(0,70),
rep(1,38),
rep(2,17),
rep(3,10),
rep(4,9),
rep(5,3),
rep(6,2),
rep(7,1))
tab <- table(mites)
NSU <- length(mites)
N <-
2012 Feb 15
1
Parameter estimation of gamma distribution
Hi,
I am trying to estiamte parameters for gamma distribution using mle for
below data using fitdist & fitdistr functions which are from "fitdistrplus"
& "MASS"packages . I am getting errors for both functions. Can someone
please let me know how to overcome this issue??
data
y1<-
c(256656, 76376, 6467673, 46446, 3400, 3100, 5760, 4562, 8000, 512, 4545,
4562,
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
2008 Jul 03
0
FW: For loop
HiI have a specific sample coming from a gamma(alpha,theta1) distribution and then divided into two parts first part follows a gamma(alpha,theta1) the second is gamma(alpha,theta2) then I would like to find the mle`s for theta1 and theta2 which I found. Now I would like to simulate those estimates 500 or 1000 times.I tried for loop but it did not work It wont do the loop the problem is that I need
2013 Jul 12
2
How to determine the pdf of a gamma distribution using the estimated parameters?
Hello everyone,
With th bar histogram (number of occurrences) hist<-c(24,7,4,1,2,1,1) of seven equally spaces classes ]1-4], ]5-8], ]9-12], ]13-16], ]17-20], ]21-24], ]25-28], I obtained shape=0.8276 and rate=0.1448.
I would like to know how to build the continuous pdf of a this gamma distribution knowing these two estimated parameters such that I will be able to predict the pdf of any