From 5f72a28432c024ab9d57b70e87186dcc607c0903 Mon Sep 17 00:00:00 2001 From: jranke Date: Mon, 25 Jun 2012 23:45:39 +0000 Subject: - Document endpoints() function - Fix unit tests that were broken by introduction of the endpoints function - Small documentation fixes - Format output of backtransformed parameters - Integrate snippet for making static documentation using staticdocs by Hadley Wickham git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@41 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- R/mkinfit.R | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'R') diff --git a/R/mkinfit.R b/R/mkinfit.R index d3ee5e7..3100b30 100644 --- a/R/mkinfit.R +++ b/R/mkinfit.R @@ -228,21 +228,25 @@ summary.mkinfit <- function(object, data = TRUE, distimes = TRUE, ...) { param <- cbind(param, se) dimnames(param) <- list(pnames, c("Estimate", "Std. Error")) + bparam <- as.matrix(object$parms.all) + dimnames(bparam) <- list(pnames, c("Estimate")) + ans <- list( - version = as.character(packageVersion("mkin")), - Rversion = paste(R.version$major, R.version$minor, sep="."), + version = as.character(packageVersion("mkin")), + Rversion = paste(R.version$major, R.version$minor, sep="."), date.fit = object$date, date.summary = date(), use_of_ff = object$mkinmod$use_of_ff, - residuals = object$residuals, - residualVariance = resvar, - sigma = sqrt(resvar), - modVariance = modVariance, - df = c(p, rdf), cov.unscaled = covar, - cov.scaled = covar * resvar, - info = object$info, niter = object$iterations, - stopmess = message, - par = param) + residuals = object$residuals, + residualVariance = resvar, + sigma = sqrt(resvar), + modVariance = modVariance, + df = c(p, rdf), cov.unscaled = covar, + cov.scaled = covar * resvar, + info = object$info, niter = object$iterations, + stopmess = message, + par = param, + bpar = bparam) ans$diffs <- object$mkinmod$diffs if(data) ans$data <- object$data @@ -285,7 +289,7 @@ print.summary.mkinfit <- function(x, digits = max(3, getOption("digits") - 3), . printCoefmat(x$par, digits = digits, ...) cat("\nBacktransformed parameters:\n") - print(as.data.frame(list(Estimate = x$parms.all))) + printCoefmat(x$bpar, digits = digits, ...) cat("\nResidual standard error:", format(signif(x$sigma, digits)), "on", rdf, "degrees of freedom\n") -- cgit v1.2.1