hi, i'm new to R and i'm trying to port a quattro pro spreadsheet into R. spreadsheets have optional lower and upper limit parameters on the beta distribution function. i would like to know how to incorporate this with R's pbeta function. thanks in advance, mara. ____________________________________________________________________________________ Park yourself in front of a world of choices in alternative vehicles. Visit [[alternative HTML version deleted]]
Hi you do not give much information, even subject line is missing. Try to follow posting guide and try to explain what you did and how did you fail. Regards Petr r-help-bounces at stat.math.ethz.ch napsal dne 16.08.2007 17:24:24:> hi, > i'm new to R and i'm trying to port a quattro pro spreadsheet into R. > spreadsheets have optional lower and upper limit parameters on the beta > distribution function. i would like to know how to incorporate this withR's> pbeta function. > > thanks in advance, > mara. > > > > > >____________________________________________________________________________________> Park yourself in front of a world of choices in alternative vehicles.Visit> > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
mara serrano <teachermara <at> yahoo.com> writes:> > hi, > i'm new to R and i'm trying to port a quattro pro spreadsheet into R.spreadsheets have optional lower and> upper limit parameters on the beta distribution function. i would like to knowhow to incorporate this> with R's pbeta function. > > thanks in advance, > mara.I think (?) you may mean a beta distribution with limits scaled other than the standard 0 and 1. You will have to construct these yourself but it's fairly easy to do, e.g. dbeta.scaled <- function(x,shape1,shape2,min,max,...) { x.scaled <- (x-min)/(max-min) dbeta(x.scaled,shape1,shape2,...) } and similarly for pbeta. For rbeta (and qbeta) the scaling has to go in the other direction. rbeta.scaled <- function(n,shape1,shape2,min,max,...) { min+(max-min)*rbeta(n,shape1,shape2,...) } I did something like this for Tiwari et al. (2006) Marine Ecology Progress Series 326:283-293 (although the paper doesn't include any R code). cheers Ben Bolker