vincent.stoliaroff@sgcib.com
2003-Jul-28 13:16 UTC
[R] defining and plotting functions thanks to equation
Hi R lovers! Are there any means to define and plot a function given the equation that specifies the function? For example I'd like to plot and work with the Gumbel Distribution density defined by Lambda(x)=exp(-exp(-x)) My question may appear very simple but I haven't got an idea yet about how to do that. I could plot something with x a vector/set of value but I don't know how to proceed with x belonging to a continuous interval Thanks for any help. ****************************************************************** The sender's email address has changed to firstname.lastname@ sgcib.com. You may want to update your personal address book. Please see http://www.sgcib.com for more information. ** This message and any attachments (the "message") are confide...{{dropped}}
Alec Stephenson
2003-Jul-28 13:41 UTC
[R] defining and plotting functions thanks to equation
The cdf of the Gumbel distribution is exp(-exp(-x)), not the density. The easiest way to plot the density is probably to download package evd and use library(evd) plot(dgumbel, -2, 5) Alec Stephenson tel +44 (0) 1524 593950 Department of Mathematics and Statistics fax +44 (0) 1524 592681 Lancaster University a.stephenson at lancaster.ac.uk Lancaster LA1 4YF http://www.maths.lancs.ac.uk/~stephena/ On Mon, 28 Jul 2003 vincent.stoliaroff at sgcib.com wrote:> Hi R lovers! > > Are there any means to define and plot a function given the equation that > specifies the function? > > For example I'd like to plot and work with the Gumbel Distribution density > defined by > Lambda(x)=exp(-exp(-x)) > > My question may appear very simple but I haven't got an idea yet about how > to do that. I could plot something with x a vector/set of value but I don't > know how to proceed with x belonging to a continuous interval > > Thanks for any help. > > > > > ****************************************************************** > The sender's email address has changed to > firstname.lastname@ sgcib.com. You may want to update your > personal address book. Please see http://www.sgcib.com for more > information. > ** > This message and any attachments (the "message") are confide...{{dropped}} > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >
vincent.stoliaroff at sgcib.com wrote:> Are there any means to define and plot a function given the equation that > specifies the function? > > For example I'd like to plot and work with the Gumbel Distribution density > defined by > Lambda(x)=exp(-exp(-x))Like this? curve(exp(-exp(-x)),0,10,101) Cheers Jason -- Indigo Industrial Controls Ltd. 64-21-343-545 jasont at indigoindustrial.co.nz