search for: pexp

Displaying 20 results from an estimated 55 matches for "pexp".

Did you mean: exp
2007 Apr 11
3
Help with pexp( )
Dear all, Sorry for bringing up an old issue: >pexp(50, 0.5) [1] 1 In some cases, pexp() gives CDF=1. I read some discussion in 2002 saying it has been patched. However it's not working in "R2.4.1Patched". Could anyone help me out? Thanks a lot, Jeann _________________________________________________________________ Fine Din...
2006 Feb 03
2
Problems with ks.test
Hi everybody, while performing ks.test for a standard exponential distribution on samples of dimension 2500, generated everytime as new, i had this strange behaviour: >data<-rexp(2500,0.4) >ks.test(data,"pexp",0.4) One-sample Kolmogorov-Smirnov test data: data D = 0.0147, p-value = 0.6549 alternative hypothesis: two.sided >data<-rexp(2500,0.4) >ks.test(data,"pexp",0.4) One-sample Kolmogorov-Smirnov test data: data D = 0.019, p-value = 0.3305 alternative hypothesis: two.s...
2011 Nov 22
4
evaluation question
Dear R People: Hope you're having a nice day. Here is a character vector: > yz [1] "pexp(3.2,rate=1)" > str(yz) chr "pexp(3.2,rate=1)" > And I would like to evaluate that vector. I tried: > eval(as.expression(yz)) [1] "pexp(3.2,rate=1)" > But that doesn't work. Any suggestions would be most welcome. I have a feeling that it's quite simp...
2002 May 03
6
problems with rexp ?
Does anyone know if R have any problems with the exponential random number generation (function rexp)? I comment it because I executed data<-sort(rexp(100)) plot(data,dexp(data)/(1-pexp(data)),type="l") and the graphic isn't constant. (Note: exponential distribution have a constant hazard failure rate). Thank you, Juan -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/...
2002 May 22
2
Bug in pexp (PR#1590)
I wonder if something like this has been reported before: > pexp(85:86,0.438) [1] 1 -Inf --please do not edit the information below-- Version: platform = i386-pc-mingw32 arch = i386 os = mingw32 system = i386, mingw32 status = major = 1 minor = 5.0 year = 2002 month = 04 day = 29 language = R Windows NT 4.0 (build 1381) Service Pack 6 Searc...
2006 Sep 23
1
Fitdistr() versus nls()
...plot(allvals.x, allvals.y) for(it in 1:100){ #extract random samples random=sort(sample(1:length(allvals.x), 15)) somevals.x=allvals.x[c(random)] somevals.y=allvals.y[c(random)] #fit with nls and fitdistr fit.exp = fitdistr(somevals.y, "exponential") nls.exp <- nls(somevals.y ~ pexp(somevals.x, rate), start=list(rate=. 0001), model=TRUE) #plot what you get out of the two fits lines(allvals.x, pexp(allvals.x, coef(fit.exp)), col=it) lines(allvals.x, pexp(allvals.x, coef(nls.exp)), col=it) #perform kolmogorov-smirnov test on your fit ks.exp.nls = ks.test(somevals.y, "...
2002 Feb 28
4
pexp.c (PR#1335)
Full_Name: M Welinder Version: 1.4 OS: (src) Submission from: (NULL) (192.5.35.38) It seems to me that pexp can be improved in the lower_tail=TRUE and log_p=FALSE case by using expm1. Something like -expm1 (-x / scale); I think. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info&...
2011 Aug 22
1
d, p, q, r - What are the math relations with each other of this functions?
Hi all, Using the exponential distribution to exemplify: The dexp function is the PDF (1) and pexp is the CDF (2), that is obtained integrating the PDF. How can I get the qexp and the rexp? Considering that I have the PDF, how this two are mathematically related to the PDF? (1) ke^{-kx} (2) 1-e^{kx} Thanks in advance.
2007 May 23
2
Possible ld.exe problem when building
...`expm1' ../nmath/libnmath.a(wilcox.o):wilcox.c:(.text+0xc0d): undefined reference to `expm1' ../nmath/libnmath.a(pgamma.o):pgamma.c:(.text+0x909): undefined reference to `expm1' ../nmath/libnmath.a(pgamma.o):pgamma.c:(.text+0xdc6): undefined reference to `expm1' ../nmath/libnmath.a(pexp.o):pexp.c:(.text+0x99): undefined reference to `expm1' ../nmath/libnmath.a(pexp.o):pexp.c:(.text+0xe6): more undefined references to `expm1' follow getline/gl.a(getline.o):getline.c:(.text+0x13f5): undefined reference to `mbrtowc' getline/gl.a(getline.o):getline.c:(.text+0x1acb): undefi...
2008 Aug 21
1
pnmath compilation failure; dylib issue?
...dchisq.o dexp.o df.o dgamma.o dgeom.o dhyper.o dlnorm.o dlogis.o dnbeta.o dnbinom.o dnchisq.o dnf.o dnorm.o dnt.o dpois.o dt.o dunif.o dweibull.o fmax2.o fmin2.o ftrunc.o gamma.o gamma_cody.o i1mach.o imax2.o imin2.o lbeta.o lgamma.o lgammacor.o mlutils.o pbeta.o pbinom.o pcauchy.o pchisq.o pexp.o pf.o pgamma.o pgeom.o phyper.o plnorm.o plogis.o pnbeta.o pnbinom.o pnchisq.o pnf.o pnmath.o pnorm.o pnt.o polygamma.o ppois.o pt.o ptukey.o punif.o pweibull.o qbeta.o qbinom.o qcauchy.o qchisq.o qexp.o qf.o qgamma.o qgeom.o qhyper.o qlnorm.o qlogis.o qnbeta.o qnbinom.o qnchisq.o qnf.o...
2001 Jul 11
1
Porting MS Structured Exception Handling to Linux.
...ode from windows 2000 to linux. The specific functionality I would like to port is called "Structured Exception Handling" and it works like so: 1. Define a function which based upons a signal throws an exceptoion. For example: void translateException(unsigned int u, EXCEPTION_POINTERS* pExp) { switch (u) { case (unsigned int)0xc0000005: throw AccessViolationException("SE_Exception::translateException() - u == 0xc0000005", pExp, u); break; default: throw SE_Exception("SE_Exception::translateException() - default:", pExp, u ); } } The idea here i...
2004 Dec 09
1
How can I estimate parameters of probability distributions?
Hi list, I have a group of data. It looks like they follow a exponential distribution. In R, how can I esimate lamda, that is the rate in pexp, of the distribution and can I use Kolmogorov-Smirnov for hypothesis testing in such a situation? I have read the "8.2 Examing the distribution of a set of data" of "An Introduction to R" but I did not find any clues on this issue. (The data is in the attachment). Thanks Wumi...
2013 May 03
0
Empirica Copula
...in package documentation we can use our own data distribution to feed on copula as long as we have d, p and q (pdf, cdf and quantile) functions are available. Hence my code for those are: # Make the functions for data distribution dSAR<-function(SAR){dexp(SAR, rate=0.5)} pSAR<-function(SAR){pexp(SAR, rate=0.5)} qSAR<-function(SAR){qexp(c(seq(0,1, .01)),SAR, rate=0.5)} dper<-function(per) {dexp(per,rate=0.5)} pper<-function(per){pexp(per,rate=0.5)} qper<-function(per){qexp(c(seq(0,1,.01)),per, rate=0.5)} gmb<-gumbelCopula(3,dim=2) # create bivariate copula object with dim=...
2006 Jun 16
0
The qurey about kolmogorov-smirnov test & adding the trendline to graph
...c(1 - exp(-lambda*data)) g <- sort(Fx) l <- c(g-k) m <- c(e/70) n <- c(m-g) o <- max(l,n) print('k-s stat:') print(o) # K-S goodness of fit test (R inbuilt formula) ks.test(x= data,"pexp", alternative = c("g"),exact = NULL) # P-P plot e <- c(1:70) f <- c((e-.5)/70) Fx <- c(1 - exp(-lambda*data)) g <- sort(Fx) plot(f,g) ========================= end ========================= The results are as follows...
2012 Jan 27
3
generate a random number with rexp ?
dear list I use runif to generate a ramdom number between min and max runif(n, min=0, max=1) however , the syntaxe of rexp does not allow that rexp(n, rate = 1) and it generate a number with the corresponding rate. The question is: how to generate a number between min and max using rexp(). Regards -- PhD candidate in Computer Science Address 3 avenue lamine, cité ezzahra, Sousse 4000
2003 Sep 23
1
AW: Rank and extract data from a series
...ow is an example. > > N <- 500 > x <- rexp(N) > y <- rank(x)/(N+1) > empCDF <- approxfun(x,y) > xvals <- seq(0,4,.01) > plot(xvals,empCDF(xvals),type="l", > xlab="Quantile",ylab="Cumulative Distribution Function") > lines(xvals,pexp(xvals),lty=2) > legend(2,.4,c("Empirical CDF","Exact CDF"),lty=1:2) > > > It's possible to tune in some parameters in approxfun() to better > match your personal preferences. Have a look at help(approxfun) for > details. > > HTH, > Jerome Asselin...
2009 Mar 17
3
R does not compile any more on FreeBSD 8.0-CURRENT
...eta.o dunif.o punif.o qunif.o runif.o dnorm.o pnorm.o qnorm.o rnorm.o dlnorm.o plnorm.o qlnorm.o rlnorm.o df.o pf.o qf.o rf.o dnf.o dt.o pt.o qt.o rt.o dnt.o dchisq.o pchisq.o qchisq.o rchisq.o rnchisq.o dbinom.o pbinom.o qbinom.o rbinom.o rmultinom.o dcauchy.o pcauchy.o qcauchy.o rcauchy.o dexp.o pexp.o qexp.o rexp.o dgeom.o pgeom.o qgeom.o rgeom.o dhyper.o phyper.o qhyper.o rhyper.o dnbinom.o pnbinom.o qnbinom.o rnbinom.o dpois.o ppois.o qpois.o rpois.o dweibull.o pweibull.o qweibull.o rweibull.o dlogis.o plogis.o qlogis.o rlogis.o dnchisq.o pnchisq.o qnchisq.o dnbeta.o pnbeta.o qnbeta.o pnf...
2003 Aug 28
2
ks.test()
...bda <- length(x)/sum(x-b) if(plot.it) { lines(x, dexpt(x, lambda = lambda, b = b), lty = lty,col="red")} result <- list(lambda = lambda, b = b) class(result) <- "expt" result} dexpt<-function(x,lambda,b) dexp(x-b,rate=lambda) pexpt<-function(x,lambda,b) pexp(x-b,rate=lambda) qexpt<-function(p,lambda,b) qexp(p,rate=lambda)+b rexpt<-function(n,lambda,b) rexp(n,rate=lambda)+b #PARETO paretofit<-function(x,b, plot.it = F, lty = 1){ x <- sort(x) alpha <- length(x)/sum(log(x/b)) if...
2010 Jan 12
1
Strange behavior when trying to piggyback off of "fitdistr"
...nvgamma, invweibull = dinvweibull, `inverse weibull` = dinvweibull, loggamma = dlgamma, genbeta = dgenbeta, `generalized beta` = dgenbeta, NULL) if (is.null(densfun)) stop("unsupported distribution") distfun <- switch(distname, exp = pexp, exponential = pexp, gamma = pgamma, `log-normal` = plnorm, lnorm = plnorm, lognormal = plnorm, weibull = pweibull, pareto = ppareto, loglogistic = pllogis, transbeta = ptrbeta, `transformed beta` = ptrbera, burr = pburr, paralogistic = pparalogis, ge...
2000 Nov 03
1
Chi-square Goodness of Fit Test
Dear R-users, is there a function for the Chi-square Goodness of Fit Test in R (compare function chisq.gof in S/S-PLUS). Thanks for help. Matthias Seitzinger -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the