-
Notifications
You must be signed in to change notification settings - Fork 0
/
print.R
27 lines (23 loc) · 788 Bytes
/
print.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
##' @export
print.cumres <- function(x,...) {
cat("\n")
print(coef(x), ...)
cat("\nBased on ", x$R, " realizations.\n",sep="")
invisible(x)
}
##' @export
summary.cumres <- function(object,...) {
res <- with(object, list(KS=KS, CvM=CvM, R=R, n=n, type=type, model=model, variable=variable))
return(structure(res, class="summary.cumres"))
}
##' @export
print.summary.cumres <- function(x,...) {
cat("\n");
for (i in 1:length(x$variable)) {
if (!is.null(x$KS)) cat("Sup-test: p-value=", x$KS[i], "\n", sep="")
if (!is.null(x$CvM)) cat("L2-test: p-value=", x$CvM[i], "\n", sep="")
cat("Based on ", x$R, " realizations. Cumulated residuals ordered by '", x$variable[i], "'.\n", sep="")
cat("---\n");
}
invisible(x)
}