From c6079a807e2b400fe0c772603392aeacd887da2f Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 8 May 2019 20:57:48 +0200 Subject: Add functionality to plot the error model by plotting squared residuals against predicted values, and showing the variance function used in the fitted error model. Rebuild docs --- man/plot.mmkin.Rd | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'man/plot.mmkin.Rd') diff --git a/man/plot.mmkin.Rd b/man/plot.mmkin.Rd index b3312292..44e5e4c7 100644 --- a/man/plot.mmkin.Rd +++ b/man/plot.mmkin.Rd @@ -12,8 +12,9 @@ then latex is being used for the formatting of the chi2 error level. } \usage{ -\method{plot}{mmkin}(x, main = "auto", legends = 1, errmin_var = "All data", errmin_digits = 3, - cex = 0.7, rel.height.middle = 0.9, ...) +\method{plot}{mmkin}(x, main = "auto", legends = 1, + resplot = c("time", "errmod"), errmin_var = "All data", errmin_digits = 3, + cex = 0.7, rel.height.middle = 0.9, ...) } \arguments{ \item{x}{ @@ -24,6 +25,11 @@ } \item{legends}{ An index for the fits for which legends should be shown. +} + \item{resplot}{ + Should the residuals plotted against time, using \code{\link{mkinresplot}}, + or as squared residuals against predicted values, with the error model, + using \code{\link{mkinerrplot}}. } \item{errmin_var}{ The variable for which the FOCUS chi2 error value should be shown. @@ -48,10 +54,11 @@ Johannes Ranke } \examples{ + \dontrun{ # Only use one core not to offend CRAN checks fits <- mmkin(c("FOMC", "HS"), list("FOCUS B" = FOCUS_2006_B, "FOCUS C" = FOCUS_2006_C), # named list for titles - cores = 1, quiet = TRUE) + cores = 1, quiet = TRUE, error_model = "tc") plot(fits[, "FOCUS C"]) plot(fits["FOMC", ]) @@ -59,4 +66,8 @@ # height should be smaller than the plot width (this is not possible for the html pages # generated by pkgdown, as far as I know). plot(fits["FOMC", "FOCUS C"]) # same as plot(fits[1, 2]) + + # Show the error models + plot(fits["FOMC", ], resplot = "errmod") + } } -- cgit v1.2.3