search for: dbeta

Displaying 20 results from an estimated 80 matches for "dbeta".

Did you mean: beta
2001 Jun 06
3
error in dbeta (PR#970)
Full_Name: Hans Peter Wolf Version: 1.2.1 OS: hpux10.20 Submission from: (NULL) (129.70.84.25) dbeta computes a wrong result with parameters (1.3,1) > version platform hppa2.0-hp-hpux10.20 arch hppa2.0 os hpux10.20 system hppa2.0, hpux10.20 status major 1 minor 2.1 year 20...
2011 Dec 01
3
Change the limits of a plot "a posteriori"
Hi all How can I change the limits (xlim or ylim) in a plot that has been already created? For example, consider this naive example curve(dbeta(x,2,4)) curve(dbeta(x,8,13),add=T,col=2) When adding the second curve, it goes off the original limits computed by R for the first graph, which are roughly, c(0,2.1) I know two obvious solutions for this, which are: 1) passing a sufficiently large parameter e.g. ylim=c(0,4) to the first graphic c...
2000 Aug 26
0
Re: [R] too large alpha or beta in dbeta ? (PR#643)
...;> "TL" == Thomas Lumley <thomas@biostat.washington.edu> writes: TL> On Thu, 24 Aug 2000, Troels Ring wrote: >>> Dear friends. >>> >>> Is this as expected ? Is alpha and beta too large simply ? >>> >>> > dbeta(.1,534,646) >>> [1] NaN >>> Warning message: >>> NaNs produced in: dbeta(x, shape1, shape2, log) TL> well, it should work, but the correct answer is effectively zero. TL> pbeta(.1,534,646) gives 3.6e-213 TL> Perhaps more worrying is...
2000 Aug 28
0
Re: [R] too large alpha or beta in dbeta ? (PR#643)
...;> "TL" == Thomas Lumley <thomas@biostat.washington.edu> writes: TL> On Thu, 24 Aug 2000, Troels Ring wrote: >>> Dear friends. >>> >>> Is this as expected ? Is alpha and beta too large simply ? >>> >>> > dbeta(.1,534,646) >>> [1] NaN >>> Warning message: >>> NaNs produced in: dbeta(x, shape1, shape2, log) TL> well, it should work, but the correct answer is effectively zero. TL> pbeta(.1,534,646) gives 3.6e-213 TL> Perhaps more worrying is...
2011 Aug 01
3
Beta fit returns NaNs
...So as noted before when I do a parameter fit to the beta distr i get: fitdist(vectNorm,"beta"); Fitting of the distribution ' beta ' by maximum likelihood Parameters: estimate Std. Error shape1 2.148779 0.1458042 shape2 810.067515 61.8608126 Warning messages: 1: In dbeta(x, shape1, shape2, log) : NaNs produced 2: In dbeta(x, shape1, shape2, log) : NaNs produced 3: In dbeta(x, shape1, shape2, log) : NaNs produced 4: In dbeta(x, shape1, shape2, log) : NaNs produced 5: In dbeta(x, shape1, shape2, log) : NaNs produced 6: In dbeta(x, shape1, shape2, log) : NaNs produced...
2000 Aug 25
1
Re: [R] too large alpha or beta in dbeta ? (PR#643)
>>>>> "TL" == Thomas Lumley <thomas@biostat.washington.edu> writes: TL> On Thu, 24 Aug 2000, Troels Ring wrote: >> Dear friends. >> >> Is this as expected ? Is alpha and beta too large simply ? >> >> > dbeta(.1,534,646) >> [1] NaN >> Warning message: >> NaNs produced in: dbeta(x, shape1, shape2, log) TL> well, it should work, but the correct answer is effectively zero. TL> pbeta(.1,534,646) gives 3.6e-213 TL> Perhaps more worrying is >> db...
2013 Sep 18
1
dbeta may hang R session for very large values of the shape parameters
Dear all, we received a bug report for betareg, that in some cases the optim call in betareg.fit would hang the R session and the command cannot be interrupted by Ctrl-C? We narrowed down the problem to the dbeta function which is used for the log likelihood evaluation in betareg.fit. Particularly, the following command hangs the R session to a 100% CPU usage in all systems we tried it (OS X 10.8.4, Debian GNU Linux, Ubuntu 12.04) with either R-3.0.1 and with the R-devel version (in all systems I waited 3...
1997 Apr 15
1
R-alpha: Bug & Patch in dbeta.c (0.50 - PreR 7)
dbeta(1, a,b) would return 1 instead of 0. Here is the patch for ..../src/math/dbeta.c : --- dbeta.c~ Sun Nov 24 23:43:10 1996 +++ dbeta.c Tue Apr 15 21:25:30 1997 @@ -23,9 +23,7 @@ { if (a <= 0.0 || b <= 0.0) DOMAIN_ERROR; - if (x <= 0) + if (x <= 0 || x >= 1.0) return 0.0; -...
2000 Aug 24
1
too large alpha or beta in dbeta ?
Dear friends. Is this as expected ? Is alpha and beta too large simply ? > dbeta(.1,534,646) [1] NaN Warning message: NaNs produced in: dbeta(x, shape1, shape2, log) Best wishes Troels -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help&qu...
2011 Jul 29
1
How to interpret Kolmogorov-Smirnov stats
Hi, Interpretation problem ! so what i did is by using the: >fit1 <- fitdist(vectNorm,"beta") Warning messages: 1: In dbeta(x, shape1, shape2, log) : NaNs produced 2: In dbeta(x, shape1, shape2, log) : NaNs produced 3: In dbeta(x, shape1, shape2, log) : NaNs produced 4: In dbeta(x, shape1, shape2, log) : NaNs produced 5: In dbeta(x, shape1, shape2, log) : NaNs produced 6: In dbeta(x, shape1, shape2, log) : NaNs produced...
2012 Jan 03
6
calculate quantiles of a custom function
Hi, I guess that my problem has an obvious answer, but I have not been able to find it. Suppose I create a custom function, consisting of two beta-distributions: myfunction <- function(x) { dbeta(x,2,6) + dbeta(x,6,2) } How can I calculate the quantiles of myfunction? I have not seen any continous function treated in the docs, and applying the "quantile function" gives me an error (since it seems only to be defined on lists and atoms). Thank you in advance, Gerhard
2007 Nov 24
2
how to compute highest density interval?
Suppose i want to compute a 95% highest density for a beta distribution beta(a,b) the two end points x1 and x2 shoudl satisfy the following two equations: pbeta(x1,a,b)-pbeta(x2,a,b)=95% dbeta(x1,a,b)=dbeta(x2,a,b) Is there any fast way to compute x1 and x2 in R? [[alternative HTML version deleted]]
2008 Sep 30
2
R's integrate function
Hello, I am trying to use R's integrate function to calculate the following integral for z=423: integrate(function(y,z){ sapply(y, function(y,z){ integrate(function(x,z) 1/x*dbeta(0.01,x/(0.005/1.005),(1-x)/(0.005/1.005))*dbeta(y,x/(0.005/1.005),(1-x)/(0.005/1.005))*(1-y)^z,0,1,423)$value }) },0,1,423)$value but I receive an error message saying that the maximum number of subdivisions is reached. If I choose a smaller z it works fine. Does anyone know what the problem is?...
2007 Nov 08
1
64-bit R-build on Mac OS X 10.4 - make check failures
...te recursion" *** caught segfault *** address 0x7fffeff7ffe30, cause 'memory not mapped' Traceback: 1: foo() 2: foo() 3: foo() ... 2154: foo() 2155: foo() 2156: foo() aborting ... Second error was in d-p-q-r-tests.Rout from this test: ## dbeta(*, ncp): a <- rlnorm(100) stopifnot(All.eq(a, dbeta(0, 1, a, ncp=0)), dbeta(0, 0.9, 2.2, ncp = c(0, a)) == Inf ) ## the first gave 0, the 2nd NaN in R <= 2.3.0 and generated this output in d-p-q-r-tests.Rout.fail > > ## dbeta(*, ncp): >...
2004 Nov 09
3
Strange results for Beta Distribution
Dear All, I got these results from the example in the function "dbeta": >x <- seq(0, 1, length=21) > dbeta(x, 1, 1) [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Any Idea? TIA Giovanni dr. Giovanni Parrinello Section of Medical Statistics Department of Biosciences University of Brescia 25127 Viale Europa, 11 Brescia Italy Tel: +390303717528 Fax:...
2010 Jan 04
3
how to plot multiple density functions in one graph
Hello, I am new to R and have two easy questions. How can you plot multiple density functions in one graph? I have five beta densities that I would like to plot in one graph. I understand how to plot one beta density as a line: plot (x,(dbeta(x,shape1=,shape2=,), type ="l") Does the Pareto distribution need to be added to R with an additional package? thanks, John [[alternative HTML version deleted]]
2008 Oct 19
1
multivariate integral with ADAPT when the parameter is close to boundary
Dear All, There is one problem I encountered when I used ADAPT to compute some 2-D integral w.r.t beta density. For example, when I try to run the following comments: fun2<-function(theta){return(dbeta(theta[1],0.005,0.005)*dbeta(theta[2],0.005,0.005))} int.fun2<-adapt(ndim=2,lo = c(0,0), up = c(1,1),functn = fun2,eps = 1e-4) It seems it will take very long time to run. Acturally, I stopped the program after it was running for like 20 minutes. I thought this might be due to the inclusion of...
2002 Jun 08
3
contour plot for non-linear models
...storm.fm))) > dv <- deviance(storm.fm) > par(pty = "s") > b1 <- bc[1] + seq(-3*se[1], 3*se[1], length = 51) > b2 <- bc[2] + seq(-3*se[2], 3*se[2], length = 51) > bv <- expand.grid(b1,b2) > ssq <- function(b) + sum((Time - b[1]*Viscosity/(Wt-b[2]))^2) > dbetas <- apply( bv, 1 , ssq) > attach(stormer) > cc <- matrix(Time - rep(bv[,1],rep(23,2601)) * + Viscosity/(Wt - rep(bv[,2], rep(23, 2601))), 23) > dbetas <- matrix(drop(rep(1,23) %% cc^2), 51) > fstat <- matrix( ((dbetas -dv)/2) / (dv/21) , 51, 51) > plot(b1, b2, type = &qu...
2017 Jun 04
0
Hlep in analysis in RWinBugs
...IT === library(R2WinBUGS) #Model model{ #likelihood for(i in 1:N){ a1[i] ~ dnorm(a11[i],tau) 2[i] ~ dnorm(a21[i],tau1) a3[i] ~ dnorm(a31[i],tau2) a11[i]<-sm[i]*S1*m1 a21[i]<-sm[i]*S1*(1-m1)*S2*m2 a31[i]<-sm[i]*S1*(1-m1)*S2*(1-m2)*S3 sum[i]<-a11[i]+a21[i]+a31[i] } #priors #priors are dbeta(0.5,0.5), uniform is dbeta(1,1) S1~dbeta(1,1)#I(0,0.2) # S2~dbeta(1,1)#I(0.15,0.5) # S3~dbeta(1,1)#I(0.3,1) m1~dbeta(1,1)#I(0.01,1) m2~dbeta(1,1)#I(0,1) sd ~ dunif(0,100) sd1 ~ dunif(0,100) sd2 ~ dunif(0,100) tau <- 1/(sd*sd) tau1 <- 1/(sd1*sd1) tau2 <- 1/(sd2*sd2) } model.file <- Model...
2017 Jun 04
0
Help in analysis in RWinBugs
...IT === library(R2WinBUGS) #Model model{ #likelihood for(i in 1:N){ a1[i] ~ dnorm(a11[i],tau) 2[i] ~ dnorm(a21[i],tau1) a3[i] ~ dnorm(a31[i],tau2) a11[i]<-sm[i]*S1*m1 a21[i]<-sm[i]*S1*(1-m1)*S2*m2 a31[i]<-sm[i]*S1*(1-m1)*S2*(1-m2)*S3 sum[i]<-a11[i]+a21[i]+a31[i] } #priors #priors are dbeta(0.5,0.5), uniform is dbeta(1,1) S1~dbeta(1,1)#I(0,0.2) # S2~dbeta(1,1)#I(0.15,0.5) # S3~dbeta(1,1)#I(0.3,1) m1~dbeta(1,1)#I(0.01,1) m2~dbeta(1,1)#I(0,1) sd ~ dunif(0,100) sd1 ~ dunif(0,100) sd2 ~ dunif(0,100) tau <- 1/(sd*sd) tau1 <- 1/(sd1*sd1) tau2 <- 1/(sd2*sd2) } model.file <- Model...