[Rcpp-commits] r3700 - in pkg/RcppArmadillo: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jul 19 02:58:50 CEST 2012


Author: edd
Date: 2012-07-19 02:58:50 +0200 (Thu, 19 Jul 2012)
New Revision: 3700

Modified:
   pkg/RcppArmadillo/ChangeLog
   pkg/RcppArmadillo/R/fastLm.R
Log:
 o also display residual standard error


Modified: pkg/RcppArmadillo/ChangeLog
===================================================================
--- pkg/RcppArmadillo/ChangeLog	2012-07-19 00:50:09 UTC (rev 3699)
+++ pkg/RcppArmadillo/ChangeLog	2012-07-19 00:58:50 UTC (rev 3700)
@@ -1,3 +1,7 @@
+2012-07-18  Dirk Eddelbuettel  <edd at debian.org>
+
+	* R/fastLm.R (summary.fastLm): Also display residual standard error
+
 2012-07-14  Dirk Eddelbuettel  <edd at debian.org>
 
 	* R/fastLm.R (fastLm.formula): Note whether intercept in formula or

Modified: pkg/RcppArmadillo/R/fastLm.R
===================================================================
--- pkg/RcppArmadillo/R/fastLm.R	2012-07-19 00:50:09 UTC (rev 3699)
+++ pkg/RcppArmadillo/R/fastLm.R	2012-07-19 00:58:50 UTC (rev 3700)
@@ -86,6 +86,8 @@
                 coefficients=TAB,
                 r.squared=r.squared,
                 adj.r.squared=adj.r.squared,
+                sigma=sqrt(sum((object$residuals)^2)/rdf),
+                df=object$df,
                 residSum=summary(object$residuals, digits=5)[-4])
 
     class(res) <- "summary.fastLm"
@@ -101,6 +103,8 @@
 
     printCoefmat(x$coefficients, P.values=TRUE, has.Pvalue=TRUE)
     digits <- max(3, getOption("digits") - 3)
+    cat("\nResidual standard error: ", formatC(x$sigma, digits=digits), " on ",
+        formatC(x$df), " degrees of freedom\n", sep="")
     cat("Multiple R-squared: ", formatC(x$r.squared, digits=digits),
         ",\tAdjusted R-squared: ",formatC(x$adj.r.squared, digits=digits),
         "\n", sep="")



More information about the Rcpp-commits mailing list