[Gmm-commits] r54 - pkg/gmm/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Apr 30 22:51:09 CEST 2012
Author: chaussep
Date: 2012-04-30 22:51:09 +0200 (Mon, 30 Apr 2012)
New Revision: 54
Modified:
pkg/gmm/R/Methods.gmm.R
Log:
added the info about the bandwidth in summary()
Modified: pkg/gmm/R/Methods.gmm.R
===================================================================
--- pkg/gmm/R/Methods.gmm.R 2012-04-30 20:21:16 UTC (rev 53)
+++ pkg/gmm/R/Methods.gmm.R 2012-04-30 20:51:09 UTC (rev 54)
@@ -35,6 +35,8 @@
names(ans$initTheta) <- names(z$coefficients)
}
ans$specMod <- object$specMod
+ ans$bw <- attr(object$w0,"Spec")$bw
+ ans$weights <- attr(object$w0,"Spec")$weights
class(ans) <- "summary.gmm"
ans
}
@@ -71,8 +73,6 @@
" (P-Vavue = ",x$fstatistic$pvfstat[i],")\n")
}
-
-
print.summary.gmm <- function(x, digits = 5, ...)
{
cat("\nCall:\n")
@@ -82,7 +82,11 @@
cat(" (",x$cue$message,")\n\n")
else
cat("\n")
- cat("Kernel: ", x$kernel,"\n\n")
+ cat("Kernel: ", x$kernel)
+ if (!is.null(x$bw))
+ cat("(with bw = ", round(x$bw,5),")\n\n")
+ else
+ cat("\n\n")
cat("Coefficients:\n")
print.default(format(x$coefficients, digits=digits),
print.gap = 2, quote = FALSE)
More information about the Gmm-commits
mailing list