aboutsummaryrefslogtreecommitdiff
path: root/man/plot.mmkin.Rd
blob: c127be8c0caba72e7dc60de35c76a5554f6bbc67 (plain) (blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.mmkin.R
\name{plot.mmkin}
\alias{plot.mmkin}
\title{Plot model fits (observed and fitted) and the residuals for a row or column
of an mmkin object}
\usage{
\method{plot}{mmkin}(
  x,
  main = "auto",
  legends = 1,
  resplot = c("time", "errmod"),
  ylab = "Residue",
  standardized = FALSE,
  show_errmin = TRUE,
  errmin_var = "All data",
  errmin_digits = 3,
  cex = 0.7,
  rel.height.middle = 0.9,
  ymax = "auto",
  ...
)
}
\arguments{
\item{x}{An object of class \code{\link{mmkin}}, with either one row or one
column.}

\item{main}{The main title placed on the outer margin of the plot.}

\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{ylab}{Label for the y axis.}

\item{standardized}{Should the residuals be standardized? This option
is passed to \code{\link{mkinresplot}}, it only takes effect if
\code{resplot = "time"}.}

\item{show_errmin}{Should the chi2 error level be shown on top of the plots
to the left?}

\item{errmin_var}{The variable for which the FOCUS chi2 error value should
be shown.}

\item{errmin_digits}{The number of significant digits for rounding the FOCUS
chi2 error percentage.}

\item{cex}{Passed to the plot functions and \code{\link{mtext}}.}

\item{rel.height.middle}{The relative height of the middle plot, if more
than two rows of plots are shown.}

\item{ymax}{Maximum y axis value for \code{\link{plot.mkinfit}}.}

\item{\dots}{Further arguments passed to \code{\link{plot.mkinfit}} and
\code{\link{mkinresplot}}.}
}
\value{
The function is called for its side effect.
}
\description{
When x is a row selected from an mmkin object (\code{\link{[.mmkin}}), the
same model fitted for at least one dataset is shown. When it is a column,
the fit of at least one model to the same dataset is shown.
}
\details{
If the current plot device is a \code{\link[tikzDevice]{tikz}} device, then
latex is being used for the formatting of the chi2 error level.
}
\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, error_model = "tc")
  plot(fits[, "FOCUS C"])
  plot(fits["FOMC", ])
  plot(fits["FOMC", ], show_errmin = FALSE)

  # We can also plot a single fit, if we like the way plot.mmkin works, but then the plot
  # 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")
  }

}
\author{
Johannes Ranke
}

Contact - Imprint