aboutsummaryrefslogtreecommitdiff
path: root/man/logLik.mkinfit.Rd
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2018-11-23 19:52:18 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2018-11-23 19:52:18 +0100
commitd566ba840f4351a3aeebf21aae0649caebe0e009 (patch)
tree41397b7d94afc8c9cefc7bdb8b76466c887eefa5 /man/logLik.mkinfit.Rd
parentb2e3fa2be6a10c29030d04edfdaf7d47d9bddcee (diff)
Add logLik method to enable AIC() on mkinfit models
Further relax two tests to pass build on Travis
Diffstat (limited to 'man/logLik.mkinfit.Rd')
-rw-r--r--man/logLik.mkinfit.Rd40
1 files changed, 40 insertions, 0 deletions
diff --git a/man/logLik.mkinfit.Rd b/man/logLik.mkinfit.Rd
new file mode 100644
index 00000000..2f3e58a1
--- /dev/null
+++ b/man/logLik.mkinfit.Rd
@@ -0,0 +1,40 @@
+\name{logLik.mkinfit}
+\alias{logLik.mkinfit}
+\title{
+ Calculated the log-likelihood of a fitted mkinfit object
+}
+\description{
+ This function simply calculates the product of the likelihood densities
+ calc
+}
+\usage{
+\method{logLik}{mkinfit}(object, ...)
+}
+\arguments{
+ \item{object}{
+ An object of class \code{\link{mkinfit}}.
+ }
+ \item{\dots}{
+ For compatibility with the generic method
+ }
+}
+\value{
+ An object of class \code{\link{logLik}} with the number of
+ estimated parameters (degradation model parameters plus variance
+ model parameters) as attribute.
+}
+\examples{
+ sfo_sfo <- mkinmod(
+ parent = mkinsub("SFO", to = "m1"),
+ m1 = mkinsub("SFO")
+ )
+ d_t <- FOCUS_2006_D
+ d_t[23:24, "value"] <- c(NA, NA) # can't cope with zero values at the moment
+ f_nw <- mkinfit(sfo_sfo, d_t, quiet = TRUE)
+ f_obs <- mkinfit(sfo_sfo, d_t, reweight.method = "obs", quiet = TRUE)
+ f_tc <- mkinfit(sfo_sfo, d_t, reweight.method = "tc", quiet = TRUE)
+ AIC(f_nw, f_obs, f_tc)
+}
+\author{
+ Johannes Ranke
+}

Contact - Imprint