Lists model equations, initial parameter values, optimised parameters for fixed effects (population), random effects (deviations from the population mean) and residual error model, as well as the resulting endpoints such as formation fractions and DT50 values. Optionally (default is FALSE), the data are listed in full.

# S3 method for nlme.mmkin
summary(
  object,
  data = FALSE,
  verbose = FALSE,
  distimes = TRUE,
  alpha = 0.05,
  ...
)

# S3 method for summary.nlme.mmkin
print(x, digits = max(3, getOption("digits") - 3), verbose = x$verbose, ...)

Arguments

object

an object of class nlme.mmkin

data

logical, indicating whether the full data should be included in the summary.

verbose

Should the summary be verbose?

distimes

logical, indicating whether DT50 and DT90 values should be included.

alpha

error level for confidence interval estimation from the t distribution

...

optional arguments passed to methods like print.

x

an object of class summary.nlme.mmkin

digits

Number of digits to use for printing

Value

The summary function returns a list based on the nlme object obtained in the fit, with at least the following additional components

nlmeversion, mkinversion, Rversion

The nlme, mkin and R versions used

date.fit, date.summary

The dates where the fit and the summary were produced

diffs

The differential equations used in the degradation model

use_of_ff

Was maximum or minimum use made of formation fractions

data

The data

confint_trans

Transformed parameters as used in the optimisation, with confidence intervals

confint_back

Backtransformed parameters, with confidence intervals if available

ff

The estimated formation fractions derived from the fitted model.

distimes

The DT50 and DT90 values for each observed variable.

SFORB

If applicable, eigenvalues of SFORB components of the model.

The print method is called for its side effect, i.e. printing the summary.

Author

Johannes Ranke for the mkin specific parts José Pinheiro and Douglas Bates for the components inherited from nlme

Examples


# Generate five datasets following SFO kinetics
sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120)
dt50_sfo_in_pop <- 50
k_in_pop <- log(2) / dt50_sfo_in_pop
set.seed(1234)
k_in <- rlnorm(5, log(k_in_pop), 0.5)
SFO <- mkinmod(parent = mkinsub("SFO"))

pred_sfo <- function(k) {
  mkinpredict(SFO,
    c(k_parent = k),
    c(parent = 100),
    sampling_times)
}

ds_sfo_mean <- lapply(k_in, pred_sfo)
names(ds_sfo_mean) <- paste("ds", 1:5)

set.seed(12345)
ds_sfo_syn <- lapply(ds_sfo_mean, function(ds) {
  add_err(ds,
    sdfunc = function(value) sqrt(1^2 + value^2 * 0.07^2),
    n = 1)[[1]]
})

# \dontrun{
# Evaluate using mmkin and nlme
library(nlme)
f_mmkin <- mmkin("SFO", ds_sfo_syn, quiet = TRUE, error_model = "tc", cores = 1)
#> Warning: Optimisation did not converge:
#> iteration limit reached without convergence (10)
f_nlme <- nlme(f_mmkin)
#> Warning: Iteration 4, LME step: nlminb() did not converge (code = 1). PORT message: false convergence (8)
summary(f_nlme, data = TRUE)
#> nlme version used for fitting:      3.1.160 
#> mkin version used for pre-fitting:  1.2.2 
#> R version used for fitting:         4.2.2 
#> Date of fit:     Thu Nov 24 08:11:11 2022 
#> Date of summary: Thu Nov 24 08:11:11 2022 
#> 
#> Equations:
#> d_parent/dt = - k_parent * parent
#> 
#> Data:
#> 90 observations of 1 variable(s) grouped in 5 datasets
#> 
#> Model predictions using solution type analytical 
#> 
#> Fitted in 0.542 s using 4 iterations
#> 
#> Variance model: Two-component variance function 
#> 
#> Mean of starting values for individual parameters:
#>     parent_0 log_k_parent 
#>      101.569       -4.454 
#> 
#> Fixed degradation parameter values:
#> None
#> 
#> Results:
#> 
#>     AIC   BIC logLik
#>   584.5 599.5 -286.2
#> 
#> Optimised, transformed parameters with symmetric confidence intervals:
#>               lower    est.   upper
#> parent_0     99.371 101.592 103.814
#> log_k_parent -4.973  -4.449  -3.926
#> 
#> Correlation: 
#>              parnt_0
#> log_k_parent 0.0507 
#> 
#> Random effects:
#>  Formula: list(parent_0 ~ 1, log_k_parent ~ 1)
#>  Level: ds
#>  Structure: Diagonal
#>          parent_0 log_k_parent Residual
#> StdDev: 6.924e-05       0.5863        1
#> 
#> Variance function:
#>  Structure: Constant plus proportion of variance covariate
#>  Formula: ~fitted(.) 
#>  Parameter estimates:
#>        const         prop 
#> 0.0001208853 0.0789968036 
#> 
#> Backtransformed parameters with asymmetric confidence intervals:
#>              lower      est.     upper
#> parent_0 99.370882 101.59243 103.81398
#> k_parent  0.006923   0.01168   0.01972
#> 
#> Estimated disappearance times:
#>         DT50  DT90
#> parent 59.32 197.1
#> 
#> Data:
#>    ds   name time observed predicted  residual    std standardized
#>  ds 1 parent    0    104.1   101.592   2.50757 8.0255     0.312451
#>  ds 1 parent    0    105.0   101.592   3.40757 8.0255     0.424594
#>  ds 1 parent    1     98.5   100.796  -2.29571 7.9625    -0.288313
#>  ds 1 parent    1     96.1   100.796  -4.69571 7.9625    -0.589725
#>  ds 1 parent    3    101.9    99.221   2.67904 7.8381     0.341796
#>  ds 1 parent    3     85.2    99.221 -14.02096 7.8381    -1.788812
#>  ds 1 parent    7     99.1    96.145   2.95512 7.5951     0.389081
#>  ds 1 parent    7     93.0    96.145  -3.14488 7.5951    -0.414065
#>  ds 1 parent   14     88.1    90.989  -2.88944 7.1879    -0.401987
#>  ds 1 parent   14     84.1    90.989  -6.88944 7.1879    -0.958480
#>  ds 1 parent   28     80.2    81.493  -1.29305 6.4377    -0.200857
#>  ds 1 parent   28     91.3    81.493   9.80695 6.4377     1.523364
#>  ds 1 parent   60     65.1    63.344   1.75642 5.0039     0.351008
#>  ds 1 parent   60     65.8    63.344   2.45642 5.0039     0.490898
#>  ds 1 parent   90     47.8    50.018  -2.21764 3.9512    -0.561252
#>  ds 1 parent   90     53.5    50.018   3.48236 3.9512     0.881335
#>  ds 1 parent  120     37.6    39.495  -1.89515 3.1200    -0.607423
#>  ds 1 parent  120     39.3    39.495  -0.19515 3.1200    -0.062549
#>  ds 2 parent    0    107.9   101.592   6.30757 8.0255     0.785943
#>  ds 2 parent    0    102.1   101.592   0.50757 8.0255     0.063245
#>  ds 2 parent    1    103.8   100.058   3.74159 7.9043     0.473361
#>  ds 2 parent    1    108.6   100.058   8.54159 7.9043     1.080626
#>  ds 2 parent    3     91.0    97.060  -6.05952 7.6674    -0.790297
#>  ds 2 parent    3     84.9    97.060 -12.15952 7.6674    -1.585874
#>  ds 2 parent    7     79.3    91.329 -12.02867 7.2147    -1.667251
#>  ds 2 parent    7    100.9    91.329   9.57133 7.2147     1.326647
#>  ds 2 parent   14     77.3    82.102  -4.80185 6.4858    -0.740366
#>  ds 2 parent   14     83.5    82.102   1.39815 6.4858     0.215571
#>  ds 2 parent   28     66.8    66.351   0.44945 5.2415     0.085748
#>  ds 2 parent   28     63.3    66.351  -3.05055 5.2415    -0.582002
#>  ds 2 parent   60     40.8    40.775   0.02474 3.2211     0.007679
#>  ds 2 parent   60     44.8    40.775   4.02474 3.2211     1.249485
#>  ds 2 parent   90     27.8    25.832   1.96762 2.0407     0.964198
#>  ds 2 parent   90     27.0    25.832   1.16762 2.0407     0.572171
#>  ds 2 parent  120     15.2    16.366  -1.16561 1.2928    -0.901595
#>  ds 2 parent  120     15.5    16.366  -0.86561 1.2928    -0.669547
#>  ds 3 parent    0     97.7   101.592  -3.89243 8.0255    -0.485009
#>  ds 3 parent    0     88.2   101.592 -13.39243 8.0255    -1.668739
#>  ds 3 parent    1    109.9    99.218  10.68196 7.8379     1.362858
#>  ds 3 parent    1     97.8    99.218  -1.41804 7.8379    -0.180921
#>  ds 3 parent    3    100.5    94.634   5.86555 7.4758     0.784603
#>  ds 3 parent    3     77.4    94.634 -17.23445 7.4758    -2.305360
#>  ds 3 parent    7     78.3    86.093  -7.79273 6.8011    -1.145813
#>  ds 3 parent    7     90.3    86.093   4.20727 6.8011     0.618620
#>  ds 3 parent   14     76.0    72.958   3.04222 5.7634     0.527848
#>  ds 3 parent   14     79.1    72.958   6.14222 5.7634     1.065722
#>  ds 3 parent   28     46.0    52.394  -6.39404 4.1390    -1.544842
#>  ds 3 parent   28     53.4    52.394   1.00596 4.1390     0.243046
#>  ds 3 parent   60     25.1    24.582   0.51786 1.9419     0.266676
#>  ds 3 parent   60     21.4    24.582  -3.18214 1.9419    -1.638664
#>  ds 3 parent   90     11.0    12.092  -1.09202 0.9552    -1.143199
#>  ds 3 parent   90     14.2    12.092   2.10798 0.9552     2.206776
#>  ds 3 parent  120      5.8     5.948  -0.14810 0.4699    -0.315178
#>  ds 3 parent  120      6.1     5.948   0.15190 0.4699     0.323282
#>  ds 4 parent    0     95.3   101.592  -6.29243 8.0255    -0.784057
#>  ds 4 parent    0    102.0   101.592   0.40757 8.0255     0.050784
#>  ds 4 parent    1    104.4   101.125   3.27549 7.9885     0.410025
#>  ds 4 parent    1    105.4   101.125   4.27549 7.9885     0.535205
#>  ds 4 parent    3    113.7   100.195  13.50487 7.9151     1.706218
#>  ds 4 parent    3     82.3   100.195 -17.89513 7.9151    -2.260886
#>  ds 4 parent    7     98.1    98.362  -0.26190 7.7703    -0.033706
#>  ds 4 parent    7     87.8    98.362 -10.56190 7.7703    -1.359270
#>  ds 4 parent   14     97.9    95.234   2.66590 7.5232     0.354357
#>  ds 4 parent   14    104.8    95.234   9.56590 7.5232     1.271521
#>  ds 4 parent   28     85.0    89.274  -4.27372 7.0523    -0.606001
#>  ds 4 parent   28     77.2    89.274 -12.07372 7.0523    -1.712017
#>  ds 4 parent   60     82.2    77.013   5.18661 6.0838     0.852526
#>  ds 4 parent   60     86.1    77.013   9.08661 6.0838     1.493571
#>  ds 4 parent   90     70.5    67.053   3.44692 5.2970     0.650733
#>  ds 4 parent   90     61.7    67.053  -5.35308 5.2970    -1.010591
#>  ds 4 parent  120     60.0    58.381   1.61905 4.6119     0.351058
#>  ds 4 parent  120     56.4    58.381  -1.98095 4.6119    -0.429530
#>  ds 5 parent    0     92.6   101.592  -8.99243 8.0255    -1.120485
#>  ds 5 parent    0    116.5   101.592  14.90757 8.0255     1.857531
#>  ds 5 parent    1    108.0    99.914   8.08560 7.8929     1.024413
#>  ds 5 parent    1    104.9    99.914   4.98560 7.8929     0.631655
#>  ds 5 parent    3    100.5    96.641   3.85898 7.6343     0.505477
#>  ds 5 parent    3     89.5    96.641  -7.14102 7.6343    -0.935382
#>  ds 5 parent    7     91.7    90.412   1.28752 7.1423     0.180267
#>  ds 5 parent    7     95.1    90.412   4.68752 7.1423     0.656304
#>  ds 5 parent   14     82.2    80.463   1.73715 6.3563     0.273295
#>  ds 5 parent   14     84.5    80.463   4.03715 6.3563     0.635141
#>  ds 5 parent   28     60.5    63.728  -3.22788 5.0343    -0.641178
#>  ds 5 parent   28     72.8    63.728   9.07212 5.0343     1.802062
#>  ds 5 parent   60     38.3    37.399   0.90061 2.9544     0.304835
#>  ds 5 parent   60     40.7    37.399   3.30061 2.9544     1.117174
#>  ds 5 parent   90     22.5    22.692  -0.19165 1.7926    -0.106913
#>  ds 5 parent   90     20.8    22.692  -1.89165 1.7926    -1.055273
#>  ds 5 parent  120     13.4    13.768  -0.36790 1.0876    -0.338259
#>  ds 5 parent  120     13.8    13.768   0.03210 1.0876     0.029517
# }