similar to: a function to compute the cumulative distribution function (cdf) of the gamma

Displaying 20 results from an estimated 700 matches similar to: "a function to compute the cumulative distribution function (cdf) of the gamma"

2013 Oct 18
1
crr question‏ in library(cmprsk)
Hi all I do not understand why I am getting the following error message. Can anybody help me with this? Thanks in advance. install.packages("cmprsk") library(cmprsk) result1 <-crr(ftime, fstatus, cov1, failcode=1, cencode=0 ) one.pout1 = predict(result1,cov1,X=cbind(1,one.z1,one.z2)) predict.crr(result1,cov1,X=cbind(1,one.z1,one.z2)) Error: could not find function
2014 Feb 24
3
Error gdata and gplots packages
Hi, I just installed Ubuntu 12.04.4. I installed R by following instructions from CRAN after modification into my /etc/apt/sources.list file sudo apt-get update sudo apt-get install r-base sudo apt-get install r-base-dev When I try to load library(gdata) ou library(gplots), I have error message : library(gdata) gdata: read.xls support for 'XLS' (Excel 97-2004) files
2013 Jul 24
3
Change values in a dateframe
Hello I have the following problem : The dataframe TEST has multiple lines for a same person because : there are differents values of Nom or differents values of Prenom but the values of Matricule or Sexe or Date.de.naissance are the same. TEST <- structure(list(Matricule = c(66L, 67L, 67L, 68L, 89L, 90L, 90L, 91L, 108L, 108L, 108L), Nom = structure(c(1L, 2L, 2L, 4L, 8L, 5L, 6L, 9L, 3L, 3L,
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
2011 Feb 01
2
Preparing dataset for glmnet: factors to dummies
Hello list. For some reason, the makers of glmnet do not accept a dataframe as input. They expect the input to be a matrix, where the dummies are already precoded. Now I have created a sample dataset with . 11 factor columns with two levels . 4 factor columns with three levels . 135 continuous columns (from a standard normal) . 100 observations (rows) Say this dataframe is in dfrPredictors. What
2007 Aug 14
2
CDF of a gamma distribution
Hi there, I have some bird flight height data that follows a gamma distribution. The data (x) goes from 0 to 700 meters (n=1055). The calculated parameters calculated from the fitdistr(x) are (shape = 5.1379, rate = 0.017541), and therefore the scale (1/rate) = 57.00929. I would like to calculate the cumulative density (or proportion of the curve) of the function at x= 50 meters. Is
2011 Feb 17
0
[BioC] Make.cdf.package error
Hi everybody, I tried to analyze a custom Affymetrix 3'-biased Array. So I wanted to make a cdf package. (My CDF file size is 1.12Go). I tried several methods but the same error occured Method 1 > #Set the working directory > setwd("D:/Analyse R/Cel files") > #library to create cdf env > library("makecdfenv") >#Create cdf environment >pkgpath
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 Apr 12
3
p-values from bootstrap - what am I not understanding?
Dear stats experts: Me and my little brain must be missing something regarding bootstrapping. I understand how to get a 95%CI and how to hypothesis test using bootstrapping (e.g., reject or not the null). However, I'd also like to get a p-value from it, and to me this seems simple, but it seems no-one does what I would like to do to get a p-value, which suggests I'm not understanding
2005 Nov 09
2
help with legacy R code
Hi there, Could somebody help me disect this legacy R script I inherited at work, I have two questions: 1. I've tried to upgrade our R version from 1.6.2 (yeah, I know), to R 2.0, but some of the lines in this script are not compatible with R 2.0, could someone help me figure out where the problem is? 2. the jpeg generated (attached) seems to be off on some of the data, is there a better way
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 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
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
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 Dec 17
1
behavior of r* and d* functions at boundaries (PR#1218)
(Sent this to r-help back in October, got no comments, forgot to re-submit it as a bug report.) There are a few inconsistencies, at least, in some of the functions that generate random deviates from particular distributions (I think they're bugs because they're inconvenient, but maybe someone can make an argument for the current behavior). If people think these are really bugs I can
2008 Aug 21
1
pnmath compilation failure; dylib issue?
(1) ...need to speed up a monte-carlo sampling...any suggestions about how I can get R to use all 8 cores of a mac pro would be most useful and very appreciated... (2) spent the last few hours trying to get pnmath to compile under os- x 10.5.4... using gcc version 4.2.1 (Apple Inc. build 5553) as downloaded from CRAN, xcode 3.0... ...xcode 3.1 installed over top of above after
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
2009 Jan 24
2
Different values for double integral
Dear R useRs, i have the function f1(x, y, z) which i want to integrate for x and y. On the one hand i do this by first integrating for x and then for y, on the other hand i do this the other way round and i wondering why i doesn't get the same result each way? z <- c(80, 20, 40, 30) "f1" <- function(x, y, z) {dgamma(cumsum(z)[-length(z)], shape=x, rate=y)}
2012 Mar 13
1
Coding C++ in R. What is faster : Using bosst external libraries or R.h header file?
Hi everyone, I have built an R package and for the sake of speed I have decided to rewrite some part of the code in C++. In my original R code I use the pnorm, qnorm, rnorm, pgamma, dgamma, rgamma, rbeta and runif function. First I was thinking in going with the boost libraries, but I noticed the functions described above are available within the R.h header file (or is it Rmath.h?). So my
2001 Nov 09
2
ks.test
Dear R-List members, I want to check if a set of measurements follows better a gamma or a lognormal distribution (see data below). Using shapiro.test I can test for normality (shapiro.test(log (Lt)). To test for gamma (and normal) distribution I would use ks.test but I need to specify its shape and scale. How should I calculate these values in R? I tried > Lt.fit <- glm(Lt ~ 1,