R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("evdbayes-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('evdbayes') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "dinfo" > > ### * dinfo > > flush(stderr()); flush(stdout()) > > ### Name: dinfo > ### Title: Information for Beta and Gamma Distributions > ### Aliases: ibeta igamma > ### Keywords: distribution > > ### ** Examples > > ibeta(shape1 = 5, shape2 = 4) shape1 shape2 mean var mode 5.00000000 4.00000000 0.55555556 0.02469136 0.57142857 > ibeta(mean = seq(0.1,0.9,0.2), var = 0.03) shape1 shape2 mean var mode 1 0.200000 1.800000 0.1 0.03 NA 2 1.800000 4.200000 0.3 0.03 0.2 3 3.666667 3.666667 0.5 0.03 0.5 4 4.200000 1.800000 0.7 0.03 0.8 5 1.800000 0.200000 0.9 0.03 NA > igamma(shape=c(38.9,7.1,47), scale=c(1.5,6.3,2.6)) shape scale mean var mode 1 38.9 1.5 58.35 87.525 56.85 2 7.1 6.3 44.73 281.799 38.43 3 47.0 2.6 122.20 317.720 119.60 > > > > cleanEx(); ..nameEx <- "posterior" > > ### * posterior > > flush(stderr()); flush(stdout()) > > ### Name: posterior > ### Title: MCMC Sampling of Posterior Distributions > ### Aliases: posterior > ### Keywords: models > > ### ** Examples > > mat <- diag(c(10000, 10000, 100)) > pn <- prior.norm(mean = c(0,0,0), cov = mat) > ## Not run: data(portpirie) > ## Not run: > ##D posterior(1000, init = c(5,1,0.1), prior = pn, lh = "gev", > ##D data = portpirie, psd = c(.02,.1,.1)) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "prior" > > ### * prior > > flush(stderr()); flush(stdout()) > > ### Name: prior > ### Title: Construction of Prior Distributions > ### Aliases: prior.prob prior.quant prior.norm > ### Keywords: models > > ### ** Examples > > mat <- diag(c(10000, 10000, 100)) > prior.norm(mean = c(0,0,0), cov = mat, trendsd = 10) $prior [1] "dprior.norm" $mean [1] 0 0 0 $icov [1] 1e-04 0e+00 0e+00 1e-04 0e+00 1e-02 $trendsd [1] 10 attr(,"class") [1] "evprior" > prior.quant(shape = c(38.9,7.1,47), scale = c(1.5,6.3,2.6)) $prior [1] "dprior.quant" $prob [1] 0.100 0.010 0.001 $shape [1] 38.9 7.1 47.0 $scale [1] 1.5 6.3 2.6 $trendsd [1] 0 attr(,"class") [1] "evprior" > prior.prob(quant = c(85,88,95), alpha = c(4,2.5,2.25,0.25)) $prior [1] "dprior.prob" $quant [1] 85 88 95 $alpha [1] 4.00 2.50 2.25 0.25 $trendsd [1] 0 attr(,"class") [1] "evprior" > > > > ### *