aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
Diffstat (limited to 'man')
-rw-r--r--man/AIC.mmkin.Rd44
-rw-r--r--man/logLik.mkinfit.Rd12
2 files changed, 52 insertions, 4 deletions
diff --git a/man/AIC.mmkin.Rd b/man/AIC.mmkin.Rd
new file mode 100644
index 00000000..e7f5c228
--- /dev/null
+++ b/man/AIC.mmkin.Rd
@@ -0,0 +1,44 @@
+\name{AIC.mmkin}
+\alias{AIC.mmkin}
+\title{
+ Calculated the AIC for a column of an mmkin object
+}
+\description{
+ Provides a convenient way to compare different kineti models fitted to the
+ same dataset.
+}
+\usage{
+ \method{AIC}{mmkin}(object, ..., k = 2)
+}
+\arguments{
+ \item{object}{
+ An object of class \code{\link{mmkin}}, containing only one column.
+ }
+ \item{\dots}{
+ For compatibility with the generic method
+ }
+ \item{k}{
+ As in the generic method
+ }
+}
+\value{
+ As in the generic method (a numeric value for single fits, or a dataframe if
+ there are several fits in the column).
+}
+\examples{
+ f <- mmkin(c("SFO", "FOMC", "DFOP"),
+ list("FOCUS A" = FOCUS_2006_A,
+ "FOCUS C" = FOCUS_2006_C))
+ AIC(f[1, "FOCUS A"]) # We get a single number for a single fit
+
+ # For FOCUS A, the models fit almost equally well, so the higher the number
+ # of parameters, the higher (worse) the AIC
+ AIC(f[, "FOCUS A"])
+ AIC(f[, "FOCUS A"], k = 0) # If we do not penalize additional parameters, we get nearly the same
+
+ # For FOCUS C, the more complex models fit better
+ AIC(f[, "FOCUS C"])
+}
+\author{
+ Johannes Ranke
+}
diff --git a/man/logLik.mkinfit.Rd b/man/logLik.mkinfit.Rd
index 8080f3db..fe517955 100644
--- a/man/logLik.mkinfit.Rd
+++ b/man/logLik.mkinfit.Rd
@@ -7,8 +7,8 @@
This function simply calculates the product of the likelihood densities
calculated using \code{\link{dnorm}}, i.e. assuming normal distribution.
- The total number of estimated parameters returned with the value
- of the likelihood is calculated as the sum of fitted degradation
+ The total number of estimated parameters returned with the value
+ of the likelihood is calculated as the sum of fitted degradation
model parameters and the fitted error model parameters.
For the case of unweighted least squares fitting, we calculate one
@@ -17,7 +17,7 @@
For the case of manual weighting, we use the weight given for each
observation as standard deviation in calculating its likelihood
- and the total number of estimated parameters is equal to the
+ and the total number of estimated parameters is equal to the
number of fitted degradation model parameters.
In the case of iterative reweighting, the variances obtained by this
@@ -28,7 +28,7 @@
reweighting method is "tc".
}
\usage{
-\method{logLik}{mkinfit}(object, ...)
+ \method{logLik}{mkinfit}(object, ...)
}
\arguments{
\item{object}{
@@ -43,6 +43,10 @@
estimated parameters (degradation model parameters plus variance
model parameters) as attribute.
}
+\seealso{
+ Compare the AIC of columns of \code{\link{mmkin}} objects using
+ \code{\link{AIC.mmkin}}.
+}
\examples{
sfo_sfo <- mkinmod(
parent = mkinsub("SFO", to = "m1"),

Contact - Imprint