R で Sn または SnB メソッドのコードを表示しようとしていますが、 CopulaパッケージでR 関数を開くと、gofCopula
コード全体が表示されません。特定のメソッドのコードにアクセスするにはどうすればよいですか? これは関数の例です:
")gofCopula(copula, x, N=1000, method="SnB
入るgofCopula
と、これだけが表示されます:
function (copula, x, N = 1000, method = eval(formals(gofTstat)$method),
estim.method = eval(formals(fitCopula)$method), simulation = c("pb",
"mult"), verbose = TRUE, print.every = NULL, optim.method = "BFGS",
optim.control = list(maxit = 20), ...)
{
stopifnot(is(copula, "copula"), N >= 1)
if (!is.matrix(x))
x <- rbind(x, deparse.level = 0L)
stopifnot((d <- ncol(x)) > 1, (n <- nrow(x)) > 0, dim(copula) ==
d)
method <- match.arg(method)
estim.method <- match.arg(estim.method)
optim.method <- match.arg(optim.method)
simulation <- match.arg(simulation)
stopifnot(optim.method %in% eval(formals(optim)$method))
if (!is.null(print.every)) {
warning("Argument 'print.every' is deprecated. Please use 'verbose' instead.")
verbose <- print.every > 0
}
if (missing(estim.method) && !missing(method)) {
eMeth <- eval(formals()$estim.method)
if (!is.na(i <- pmatch(method, eMeth))) {
warning("old (pre 0.999-*) argument 'method' is now called 'estim.method'")
estim.method <- eMeth[i]
method <- "Sn"
}
}
switch(simulation, pb = {
gofPB(copula, x, N = N, method = method, estim.method = estim.method,
verbose = verbose, optim.method = optim.method, optim.control = optim.control,
...)
}, mult = {
gofMB(copula, x = x, N = N, method = method, estim.method = estim.method,
optim.method = optim.method, optim.control = optim.control,
...)
}, stop("Invalid simulation method ", simulation))
}
<environment: namespace:copula>