Skip to content
Snippets Groups Projects
Commit 4dd118d5 authored by Wehrens, Ron's avatar Wehrens, Ron
Browse files

updated NEWS and vignette

parent 0724f367
Branches develop main
No related tags found
No related merge requests found
......@@ -2,7 +2,12 @@ aaresponse version 1.0.0 is described in
R. Wehrens, J. Engel, J. Mes, A. de Jong and D. Esser, Amino
Acids (2024) 56:25; https://doi.org/10.1007/s00726-024-03386-6.
Changes in version 1.0.2: (now develop branch)
Changes in version 1.0.4:
- More flexible axis labels to allow the analysis of systems other
than amino acids
- Included two bug fixes by Guido Hooiveld
- Added "traditional" ways to estimate PoIs
- Accidentally skipped minor version numbers, too lazy to correct this
Changes in version 1.0.1:
- extractParameters now returns an object of class 'aar' rather than
......
fitMixedModels <-
function(dt, refIntervention,
model.formula, lm.alternative,
mainFun = lme4:::lmer, respondersOnly = TRUE)
mainFun = lme4::lmer, respondersOnly = TRUE)
{
imputedValues <- "AUC.orig" %in% colnames(dt)
......@@ -110,7 +110,7 @@ compareInterventions <-
logTransform = FALSE,
model.formula = "~ Period + Intervention + (1 | Participant)",
lm.alternative = "~ Period + Intervention",
mainFun = lme4:::lmer, singularFun = lm,
mainFun = lme4::lmer, singularFun = lm,
respondersOnly = TRUE, ...)
{
model.terms <- trimws(strsplit(model.formula, "\\+")[[1]])
......
......@@ -156,8 +156,7 @@ showDataFits <-
for (pp in 1:nrow(params)) {
if (!any(is.na(params[pp, parameters])))
panel.lines(xx*15,
aaresponse:::woodFun(params[pp, parameters],
xx - minTime/15),
woodFun(params[pp, parameters], xx - minTime/15),
col = mycols[as.integer(params[pp, "Intervention"])])
}
}
......
......@@ -11,7 +11,7 @@ compareInterventions(
logTransform = FALSE,
model.formula = "~ Period + Intervention + (1 | Participant)",
lm.alternative = "~ Period + Intervention",
mainFun = lme4:::lmer, singularFun = lm, respondersOnly = TRUE, ...)
mainFun = lme4::lmer, singularFun = lm, respondersOnly = TRUE, ...)
}
\arguments{
\item{dt}{A data frame with at least the columns in the \code{target},
......
......@@ -16,7 +16,7 @@ return the parameter of interest.
\usage{
getAUC(prs, maxT = 300)
getHeight(prs)
getTime2Max(prs, minutes = TRUE)
getTime2Max(prs, minutes = TRUE, minTime = 0)
extractParameters(prs.df, maxT = 300, minutes = TRUE)
}
\arguments{
......@@ -28,12 +28,14 @@ extractParameters(prs.df, maxT = 300, minutes = TRUE)
minutes.}
\item{minutes}{Whether the time to the peak maximum should be
expressed in minutes. Default is TRUE.}
\item{minTime}{The earliest time point, which may be negative.}
}
\value{The simple extraction functions return scalars, function
\code{extractParameters} returns an object of class 'aar'.}
\author{Ron Wehrens}
\seealso{
\code{\link{checkAAdata}}, \code{\link{extractParameters}}, \code{\link{showCIs}}
\code{\link{checkAAdata}}, \code{\link{fitWood}},
\code{\link{extractParameters}}, \code{\link{showCIs}}
}
\examples{
\dontrun{
......
......@@ -10,7 +10,7 @@
\usage{
fitMixedModels(dt, refIntervention,
model.formula, lm.alternative,
mainFun = lme4:::lmer, respondersOnly = TRUE)
mainFun = lme4::lmer, respondersOnly = TRUE)
}
\arguments{
\item{dt}{Data frame containing the relevant information.}
......
......@@ -5,7 +5,7 @@
Fit a Wood curve through a time series.
}
\description{
A Wood curve is given by y(t) = d + a t^{mc} e^{-ct} where d is the
A Wood curve is given by \eqn{y(t) = d + a t^{mc} e^{-ct}} where d is the
baseline, m is the time to the maximum, c is related to the rise and
fall of the curve, and a to the height. The fit is done by numerical
optimization using 500 random starts. In normal usage the \code{fitWood}
......@@ -29,6 +29,11 @@ fitWoodAll(aadata, what = c("all", "aas", "essentials", "totals"))
Participant, Period, Intervention and AA (using \code{aggregate}). Its
result is an object of class "aar".
}
\details{Time values in Wood curves need to be non-negative. In
practice, sampling points may occur before t=0, the administration of
the treatment. Internally this is solved by simply setting the
earliest time point to zero for the curves, and shifting back in the
calculation of the parameters of interest, and in making figures.}
\references{
P.D.P. Wood, Algebraic model of the lactation curve in cattle. Nature
216:164-165 (1967)
......
......@@ -9,9 +9,11 @@
parameters of interest, AUC, peak height, and time to peak maximum.
}
\usage{
showCIs(resultsTable, ...)
showCIs(resultsTable,
ylab = expression(paste("AA level (", mu, "M)", sep = "")), ...)
showCombinedCIs(lAUC = NULL, AUC = NULL, Height = NULL, Time2Max = NULL,
relevantAAs, what, between, subset, ...)
relevantAAs, what = c("all", "aas", "essentials", "totals"),
between, subset, ylab = "Amino acid", ...)
}
\arguments{
\item{resultsTable, lAUC, AUC, Height, Time2Max}{An object generated
......@@ -29,7 +31,7 @@ showCombinedCIs(lAUC = NULL, AUC = NULL, Height = NULL, Time2Max = NULL,
results on a ratio scale from the other PoIs that are always on a
difference scale.}
\item{subset}{Optional definition of a subset of amino acids.}
\item{\dots}{Additional arguments to the underlying plot function,
\item{ylab,\dots}{Additional arguments to the underlying plot function,
most often used to define a subset of the results to be displayed
(see examples).}
}
......
......@@ -477,6 +477,16 @@ starting points and quite generous optimization boundaries to avoid
missing the true optimum. The result is a named vector, also containing
the RMS value of the fit.
As of version 1.0.4 of the package, it is possible to have time points
that are sampled before $t = 0$ -- this is a very useful strategy
since it adds to the reliability of the estimates of the
baselines. The Wood curves, however, require non-negative time
values. Therefore, in cases with negative time points, the time axis is
shifted in the fitting of the Wood curves so that the first time point
equals $t = 0$. Again, this means that the Wood curve parameters need
to be interpreted on a different scale than the data. This is relevant
in plotting, for example, and in extracting PoIs (see below).
Function \code{fitWood} is useful to assess individual cases, but will
rarely be used directly -- in
principle one will want to fit all curves in a data set. This can
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment