From 082be7baa35d7e8131a70ca8cc061d90e08fa584 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 15 Apr 2020 01:27:02 +0200 Subject: A plot method for nlme.mmkin fits --- man/nlme.Rd | 2 +- man/nlme.mmkin.Rd | 11 ++++++--- man/plot.nlme.mmkin.Rd | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 man/plot.nlme.mmkin.Rd (limited to 'man') diff --git a/man/nlme.Rd b/man/nlme.Rd index 971ba3f5..f31c7a4f 100644 --- a/man/nlme.Rd +++ b/man/nlme.Rd @@ -4,7 +4,7 @@ \alias{nlme_function} \alias{mean_degparms} \alias{nlme_data} -\title{Estimation of parameter distributions from mmkin row objects} +\title{Helper functions to create nlme models from mmkin row objects} \usage{ nlme_function(object) diff --git a/man/nlme.mmkin.Rd b/man/nlme.mmkin.Rd index 5f937488..1fecb5dd 100644 --- a/man/nlme.mmkin.Rd +++ b/man/nlme.mmkin.Rd @@ -54,11 +54,13 @@ parameters taken from the mmkin object are used} \item{verbose}{passed to nlme} } \value{ -Upon success, a fitted nlme.mmkin object, which is - an nlme object with additional elements +Upon success, a fitted nlme.mmkin object, which is an nlme object + with additional elements } \description{ -Create an nlme model for an mmkin row object +This functions sets up a nonlinear mixed effects model for an mmkin row +object. An mmkin row object is essentially a list of mkinfit objects that +have been obtained by fitting the same model to a list of datasets. } \examples{ ds <- lapply(experimental_data_for_UBA_2019[6:10], @@ -70,3 +72,6 @@ nlme(f, random = parent_0 ~ 1) f_nlme <- nlme(f, start = c(parent_0 = 100, log_k_parent_sink = 0.1)) update(f_nlme, random = parent_0 ~ 1) } +\seealso{ +\code{\link{nlme_function}} +} diff --git a/man/plot.nlme.mmkin.Rd b/man/plot.nlme.mmkin.Rd new file mode 100644 index 00000000..c0e749aa --- /dev/null +++ b/man/plot.nlme.mmkin.Rd @@ -0,0 +1,67 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot.nlme.mmkin.R +\name{plot.nlme.mmkin} +\alias{plot.nlme.mmkin} +\title{Plot a fitted nonlinear mixed model obtained via an mmkin row object} +\usage{ +\method{plot}{nlme.mmkin}( + x, + i = 1:ncol(x$mmkin_orig), + main = "auto", + legends = 1, + resplot = c("time", "errmod"), + standardized = FALSE, + cex = 0.7, + rel.height.middle = 0.9, + ymax = "auto", + ... +) +} +\arguments{ +\item{x}{An object of class \code{\link{nlme.mmkin}}} + +\item{i}{A numeric index to select datasets for which to plot the nlme fit, +in case plots get too large} + +\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{standardized}{Should the residuals be standardized? This option +is passed to \code{\link{mkinresplot}}, it only takes effect if +`resplot = "time"`.} + +\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{ +Plot a fitted nonlinear mixed model obtained via an mmkin row object +} +\examples{ +ds <- lapply(experimental_data_for_UBA_2019[6:10], + function(x) subset(x$data[c("name", "time", "value")], name == "parent")) +f <- mmkin("SFO", ds, quiet = TRUE, cores = 1) +#plot(f) # too many panels for pkgdown +library(nlme) +f_nlme <- nlme(f) + +#plot(f_nlme) # too many panels for pkgdown +plot(f_nlme, 1:2) +} +\author{ +Johannes Ranke +} -- cgit v1.2.1