similar to: Problem with dgamma function.

Displaying 20 results from an estimated 200 matches similar to: "Problem with dgamma function."

2007 Apr 23
2
Problem with dgamma ?
Hi All, Here 's what I got using dgamma function : > nu<-.2 > nu*log(nu)-log(gamma(nu))+(nu-1)*log(1)-nu*(1) [1] -2.045951 > dgamma(1,nu,nu,1) [1] 0.0801333 > dgamma(1,nu,nu,0) [1] NaN Warning message: NaNs produced in: dgamma(x, shape, scale, log) Could anyone tell me what is wrong here ? I am using R-2.4.1 on windows XP. Thanks a lot.
2016 Nov 13
1
dgamma density values in extreme point
Dear R-Devel group, My name is Alexey, a data scientist from Moscow, currently working for Align Technology Inc. We have recently had a discussion of the results that the dgamma function (stats) returns for an extreme point (x == 0). <dgamma(0,1,1,log = FALSE) [1] 1 and <dgamma(0,0.5,1,log = FALSE) [1] Inf Density appears to be defined in point zero for the distribution with the
2011 Sep 10
1
dgamma in jags within r
I define priors in jags within r using a gamma distribution. I would like to control the shape but I have problems. Any help will be usefull. From help of dgamma ___________________ 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) and rate=1/scale From jags user manual ____________________ dgamma(r, mu) has a density of
2008 Jun 25
1
dgamma in WinBUGS and JAGS (rjags)
Hello, In WinBUGS 1.4 manual (http://www.mrc-bsu.cam.ac.uk/bugs/winbugs/manual14.pdf), the gamma density is presented as dgamma(r,mu) where r and mu are the shape and rate parameters, respectively. In JAGS (rjags) manual version 1.0.2, May 9, 2008 (http://www-fis.iarc.fr/~martyn/software/jags/jags_user_manual.pdf), on page 26 the gamma density is presented as dgamma(mu,r) instead of dgamma(r,mu).
2002 Jan 11
2
new dgamma rate argument
Can someone explain to me in what way the new (dpqr)gamma parameter can be interpreted as a rate (when shape != 1)? The only gamma rate that I am aware of is the hazard rate given by dgamma/(1-pgamma), the log of which is returned by my hgamma function (event library). Jim -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
1998 Feb 23
1
R-beta: Help: cov.mve in R? dgamma in Splus?
Hi all I have a couple of obscure questions for R/Splus experts (which unfortunately isn't me!) I am trying to compute Bayes Factors using some Splus code of Raftery in Gilks et al (1996). Only problem is 1) R doesn't seem to have a robust covariance (cov.mve) which I suspect I need rather than a non-robust classical estimate 2) Splus has cov.mve BUT dgamma in Splus doesn't have a
2005 Nov 04
1
dgamma error condition?
There's an apparent inconsistency between the behavior of d(pqr)gamma and other distribution functions for "bad" parameter values. Specifically, most distributions give NaN and a warning for bad parameters (e.g. probabilities <0 or >1). In contrast, d(pqr)gamma actually gives an error and stops when shape<0. I don't see why it has to be this way -- the internal C code
2005 Jun 25
1
comment in src/nmath/dgamma.c
Hi, In src/nmath/dgamma.c the comment at the top says * DESCRIPTION * * Computes the density of the gamma distribution, * * 1/s (x/s)^{a-1} exp(-x/s) * p(x;a,s) = ----------------------- * (a-1)! * * where `s' is the scale (= 1/lambda in other parametrizations) * and `a' is the shape parameter ( = alpha in
2006 Jun 03
1
Fw: Compiling chan_bluetooth
Just to close the thread. The problem was that I was using an old version of the code. If anyone has the same problem, you can download the code from here: http://www.thetechguide.com/howto/asterisk/bluetoothfiles.tar.gz Good luck, Danko ----- Original Message ----- From: "Danko Miocevic" <danko@santirso.com.ar> To: "Asterisk
2006 May 08
4
Asterisk documentation..
Where can I get some asterisk books.. or tutorials..? I?ve been searching in google.. but I find just some tutorials explaining how to fast set up an asterisk server. I want to learn how to use it and how to make my own configurations. So, the thing is that I want to know what is the best book or tutorial that you know? recomendations? Thanks to everyone... Danko Miocevic
2006 May 27
1
Compiling chan_bluetooth
Hello, I?m trying to use my phone with asterisk to get GSM connectivity but I can?t compile the code. I got the asterisk, chan_bluetooth, zaptel and libpri sources, the last two ones compiled perfectly. I have added this to the /usr/src/asterisk/channels/Makefile: include /usr/src/chan_bluetooth/Makefile and I?ve also added chan_bluetooth.so to the CHANNEL_LIBS var. When I do "make
2007 Nov 16
4
Returning vectors of two different data types back to R environment (from C).
Hello, Quick question. I have written a C function - I would like to make it return two vectors to the R environment - one STRSXP vector, and one INTSXP vector. Is this possible/ easy to do using the API? I looked, but could not find the answer to this question in the "Writing R Extensions" guide. Thanks very much for your help! Charles [[alternative HTML version deleted]]
2008 Mar 05
1
SEXP size management.
Hi, Trying to decrease the size of a SEXP variable without reassigning values individually in a loop. So far, I've tried using Realloc, as the follow source demonstrates: SEXP dothis() { SEXP Rblah; PROTECT(Rblah = NEW_INTEGER(6)); int* blah = INTEGER(Rblah); blah[0] = 1; blah[1] = 2; blah[2] = 3; Realloc(Rblah, 3, INTEGER); UNPROTECT(1); return(Rblah); } According to the
2008 Apr 23
1
cbind speed.
cbind/ rbind/ data.frame functions are very convenient for merging vectors of different types into a single data frame, but take quite a bit of time to execute on larger data sets. Is it possible to speed these up a bit? What functions do you use instead? Thanks & regards, Charles
2008 Oct 25
1
Dynamic linking to binary code from other packages??
Dear R-devel, I am writing a package that needs some C++ functions from an external SDK (Affymetrix fusion). The same functions are already compiled into another package (affxparser). Can I dynamically link to the compiled code in affxparser, rather than re-compiling these separately into my package? Not a lot of experience on this subject! Thanks, Charles
2013 Apr 09
5
Error when using fitdist function in R
Hello everyone, I was trying to do some distribution fitting with a numerical field called Tolls. The sample size = 999 rows. Basically I assigned the Toll data to a new variable K by doing: k<-dtest$Toll After that, tried to fit a gamma distribution by doing: fitG<-fitdist(k, "gamma") Then the following messages showed (oh and I checked for empty rows before doing this):
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
2000 Feb 10
3
creating a grid of function values
I want to create a grid of function values for use in `contour' or `persp'. The function is the log-likelihood for the gamma. The sample is stored as vector of length 20 called `Survival'. A single evaluation of the log-likelihood at, say, scale = 9 and shape = 10 would be obtained by sum(dgamma(Survival, scale = 9, shape = 10, log = TRUE)) (This may work only 0.99.0, I'm not
2008 May 21
2
Converting Data Types
Hi, How can I convert the matrices to list. For example I have this snippet: samples<-mymatrix[1,] print(samples) which prints: V1 V2 V3 V4 V5 V6 1 103.9 88.5 242.9 206.6 175.7 164.4 How can I convert the object "samples" such that it prints: [1] 103.9 88.5 242.9 206.6 175.7 164.4 The reason I ask this because I can't use the former "samples"
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: