diff --git a/R/anova.R b/R/anova.R index 97efa96..9a4edf5 100644 --- a/R/anova.R +++ b/R/anova.R @@ -54,19 +54,21 @@ #' anova(adj1, adj0) #' } #' -#' got_texmex <- requireNamespace("texmex", quietly = TRUE) -#' if (got_texmex) { -#' library(texmex) -#' large <- evm(temp, ow, gev, mu = ~ loc, phi = ~ loc, xi = ~loc) -#' medium <- evm(temp, ow, gev, mu = ~ loc, phi = ~ loc) -#' small <- evm(temp, ow, gev, mu = ~ loc) -#' tiny <- evm(temp, ow, gev) -#' adj_large<- alogLik(large, cluster = ow$year) +#' got_extRemes <- requireNamespace("extRemes", quietly = TRUE) +#' if (got_extRemes) { +#' library(extRemes) +#' large <- fevd(temp, ow, location.fun = ~ ow$loc, scale.fun = ~ ow$loc, +#' shape.fun = ~ ow$loc) +#' medium <- fevd(temp, ow, location.fun = ~ ow$loc, scale.fun = ~ ow$loc) +#' small <- fevd(temp, ow, location.fun = ~ ow$loc) +#' tiny <- fevd(temp, ow) +#' adj_large <- alogLik(large, cluster = ow$year) #' adj_medium <- alogLik(medium, cluster = ow$year) #' adj_small <- alogLik(small, cluster = ow$year) #' adj_tiny <- alogLik(tiny, cluster = ow$year) #' anova(adj_large, adj_medium, adj_small, adj_tiny) #' } + #' @export anova.lax <- function (object, object2, ...) { if (missing(object)) { diff --git a/man/anova.lax.Rd b/man/anova.lax.Rd index fdde515..8e3730c 100644 --- a/man/anova.lax.Rd +++ b/man/anova.lax.Rd @@ -60,14 +60,15 @@ if (got_evd) { anova(adj1, adj0) } -got_texmex <- requireNamespace("texmex", quietly = TRUE) -if (got_texmex) { - library(texmex) - large <- evm(temp, ow, gev, mu = ~ loc, phi = ~ loc, xi = ~loc) - medium <- evm(temp, ow, gev, mu = ~ loc, phi = ~ loc) - small <- evm(temp, ow, gev, mu = ~ loc) - tiny <- evm(temp, ow, gev) - adj_large<- alogLik(large, cluster = ow$year) +got_extRemes <- requireNamespace("extRemes", quietly = TRUE) +if (got_extRemes) { + library(extRemes) + large <- fevd(temp, ow, location.fun = ~ ow$loc, scale.fun = ~ ow$loc, + shape.fun = ~ ow$loc) + medium <- fevd(temp, ow, location.fun = ~ ow$loc, scale.fun = ~ ow$loc) + small <- fevd(temp, ow, location.fun = ~ ow$loc) + tiny <- fevd(temp, ow) + adj_large <- alogLik(large, cluster = ow$year) adj_medium <- alogLik(medium, cluster = ow$year) adj_small <- alogLik(small, cluster = ow$year) adj_tiny <- alogLik(tiny, cluster = ow$year)