diff options
Diffstat (limited to 'man')
| -rw-r--r-- | man/D24_2014.Rd | 23 | ||||
| -rw-r--r-- | man/mkinds.Rd | 2 | ||||
| -rw-r--r-- | man/mkindsg.Rd | 5 | ||||
| -rw-r--r-- | man/mkinfit.Rd | 3 | ||||
| -rw-r--r-- | man/mkinpredict.Rd | 4 | ||||
| -rw-r--r-- | man/multistart.Rd | 4 | ||||
| -rw-r--r-- | man/nlme.Rd | 2 | ||||
| -rw-r--r-- | man/plot.mixed.mmkin.Rd | 2 | ||||
| -rw-r--r-- | man/saem.Rd | 13 |
9 files changed, 47 insertions, 11 deletions
diff --git a/man/D24_2014.Rd b/man/D24_2014.Rd index d555d348..8a97dc47 100644 --- a/man/D24_2014.Rd +++ b/man/D24_2014.Rd @@ -25,6 +25,9 @@ context of pesticide registrations, as the use of the data may be constrained by data protection regulations. } \details{ +The acronyms used for the 2,4-D transformation products are DCP for +2,4-dichlorophenol and DCA for 2,4-dichloroanisole. + Data for the first dataset are from p. 685. Data for the other four datasets were used in the preprocessed versions given in the kinetics section (p. 761ff.), with the exception of residues smaller than 1 for DCP @@ -46,6 +49,26 @@ m_D24_2 = mkinmod(D24 = mkinsub("DFOP", to = "DCP"), DCP = mkinsub("SFO", to = "DCA"), DCA = mkinsub("SFO")) print(m_D24_2) +D24_2014_data <- lapply(D24_2014$ds, function(x) x$data) +names(D24_2014_data) <- sapply(D24_2014$ds, function(x) x$title) +f_D24_2014_const <- mmkin( + models = list( + "SFO-SFO-SFO" = m_D24, + "DFOP-SFO-SFO" = m_D24_2), + data = D24_2014_data, + quiet = TRUE) +print(f_D24_2014_const) +plot(f_D24_2014_const[, 3]) +f_D24_2014_tc <- update(f_D24_2014_const, error_model = "tc") +print(f_D24_2014_tc) +plot(f_D24_2014_tc[, 3]) +# For dataset 3, the best fit is obtained using constant +# variance and the DFOP-SFO-SFO model +AIC( + f_D24_2014_const[["SFO-SFO-SFO", 3]], + f_D24_2014_const[["DFOP-SFO-SFO", 3]], + f_D24_2014_tc[["SFO-SFO-SFO", 3]], + f_D24_2014_tc[["DFOP-SFO-SFO", 3]]) } } \keyword{datasets} diff --git a/man/mkinds.Rd b/man/mkinds.Rd index a822bf80..a2c58300 100644 --- a/man/mkinds.Rd +++ b/man/mkinds.Rd @@ -17,7 +17,7 @@ \description{ At the moment this dataset class is hardly used in mkin. For example, mkinfit does not take mkinds datasets as argument, but works with dataframes -such as the on contained in the data field of mkinds objects. Some datasets +such as the one contained in the data field of mkinds objects. Some datasets provided by this package come as mkinds objects nevertheless. } \examples{ diff --git a/man/mkindsg.Rd b/man/mkindsg.Rd index 3eee5562..3b6a9f61 100644 --- a/man/mkindsg.Rd +++ b/man/mkindsg.Rd @@ -23,6 +23,11 @@ so that combined evaluations are desirable. Time normalisation factors are initialised with a value of 1 for each dataset if no data are supplied. } +\note{ +Currently, no functions making use of the defined class structure +are available in this package. Refer to \link{D24_2014} for an example +dataset in this structure, with some example evaluations. +} \examples{ mdsg <- mkindsg$new("Experimental X", experimental_data_for_UBA_2019[6:10]) diff --git a/man/mkinfit.Rd b/man/mkinfit.Rd index f96b4d22..edec9546 100644 --- a/man/mkinfit.Rd +++ b/man/mkinfit.Rd @@ -39,7 +39,8 @@ model to be fitted to the data, or one of the shorthand names ("SFO", parent only degradation model is generated for the variable with the highest value in \code{observed}.} -\item{observed}{A dataframe with the observed data. The first column called +\item{observed}{A dataframe or an object coercible to a dataframe +(e.g. a \code{tibble}) with the observed data. The first column called "name" must contain the name of the observed variable for each data point. The second column must contain the times of observation, named "time". The third column must be named "value" and contain the observed values. diff --git a/man/mkinpredict.Rd b/man/mkinpredict.Rd index 792d0e47..f68f6c7a 100644 --- a/man/mkinpredict.Rd +++ b/man/mkinpredict.Rd @@ -71,7 +71,7 @@ parent compound.} \item{use_symbols}{If set to \code{TRUE} (default), symbol info present in the \link{mkinmod} object is used if available for accessing compiled code} -\item{method.ode}{The solution method passed via \link{mkinpredict} to \link{ode}] in +\item{method.ode}{The solution method passed via \link{mkinpredict} to \code{deSolve::ode()} in case the solution type is "deSolve" and we are not using compiled code. When using compiled code, only lsoda is supported.} @@ -86,7 +86,7 @@ the observed variables (default) or for all state variables (if set to FALSE). Setting this to FALSE has no effect for analytical solutions, as these always return mapped output.} -\item{na_stop}{Should it be an error if \link{ode} returns NaN values} +\item{na_stop}{Should it be an error if \code{deSolve::ode()} returns NaN values} } \value{ A matrix with the numeric solution in wide format diff --git a/man/multistart.Rd b/man/multistart.Rd index 0df29bfa..d3c23bcf 100644 --- a/man/multistart.Rd +++ b/man/multistart.Rd @@ -77,7 +77,7 @@ dmta_ds[["Elliot 1"]] <- dmta_ds[["Elliot 2"]] <- NULL f_mmkin <- mmkin("DFOP", dmta_ds, error_model = "tc", cores = 7, quiet = TRUE) f_saem_full <- saem(f_mmkin) f_saem_full_multi <- multistart(f_saem_full, n = 16, cores = 16) -parplot(f_saem_full_multi, lpos = "topleft") +parplot(f_saem_full_multi, lpos = "topleft", las = 2) illparms(f_saem_full) f_saem_reduced <- update(f_saem_full, no_random_effect = "log_k2") @@ -87,7 +87,7 @@ illparms(f_saem_reduced) library(parallel) cl <- makePSOCKcluster(12) f_saem_reduced_multi <- multistart(f_saem_reduced, n = 16, cluster = cl) -parplot(f_saem_reduced_multi, lpos = "topright", ylim = c(0.5, 2)) +parplot(f_saem_reduced_multi, lpos = "topright", ylim = c(0.5, 2), las = 2) stopCluster(cl) } } diff --git a/man/nlme.Rd b/man/nlme.Rd index e87b7a00..2c92f31b 100644 --- a/man/nlme.Rd +++ b/man/nlme.Rd @@ -15,7 +15,7 @@ nlme_data(object) \value{ A function that can be used with nlme -A \code{\link{groupedData}} object +A \code{nlme::groupedData} object } \description{ These functions facilitate setting up a nonlinear mixed effects model for diff --git a/man/plot.mixed.mmkin.Rd b/man/plot.mixed.mmkin.Rd index 1e264db3..3c44510d 100644 --- a/man/plot.mixed.mmkin.Rd +++ b/man/plot.mixed.mmkin.Rd @@ -25,7 +25,7 @@ nrow.legend = ceiling((length(i) + 1)/ncol.legend), rel.height.legend = 0.02 + 0.07 * nrow.legend, rel.height.bottom = 1.1, - pch_ds = 1:length(i), + pch_ds = c(1:25, 33, 35:38, 40:41, 47:57, 60:90)[1:length(i)], col_ds = pch_ds + 1, lty_ds = col_ds, frame = TRUE, diff --git a/man/saem.Rd b/man/saem.Rd index fd19fe59..5a125ab6 100644 --- a/man/saem.Rd +++ b/man/saem.Rd @@ -22,6 +22,7 @@ saem(object, ...) omega.init = "auto", covariates = NULL, covariate_models = NULL, + center_covariates = c(NA, "median", "mean"), no_random_effect = NULL, error.init = c(1, 1), nbiter.saemix = c(300, 100), @@ -101,6 +102,10 @@ initialisation of \link[saemix:saemixModel]{saemix::saemixModel} is used for ome variable, i.e. of the type 'parameter ~ covariate'. Covariates must be available in the 'covariates' data frame.} +\item{center_covariates}{Either NA, for no centering, or your +preferred function for calculating the center, currently either +median or mean.} + \item{no_random_effect}{Character vector of degradation parameters for which there should be no variability over the groups. Only used if the covariance model is not explicitly specified.} @@ -199,9 +204,11 @@ print(f_saem_dfop_sfo) plot(f_saem_dfop_sfo) summary(f_saem_dfop_sfo, data = TRUE) -# The following takes about 6 minutes -f_saem_dfop_sfo_deSolve <- saem(f_mmkin["DFOP-SFO", ], solution_type = "deSolve", - nbiter.saemix = c(200, 80)) +# The following took about 6 minutes and currently fails with +# "Error in deSolve::lsoda(y = odeini, times = outtimes_deSolve, func = lsoda_func, : +# illegal input detected before taking any integration steps - see written message" +#f_saem_dfop_sfo_deSolve <- saem(f_mmkin["DFOP-SFO", ], solution_type = "deSolve", +# nbiter.saemix = c(200, 80)) #anova( # f_saem_dfop_sfo, |
