aboutsummaryrefslogtreecommitdiff
path: root/man/logLik.mkinfit.Rd
blob: 6b40305e01252bc7986f5ca65aee8e72242935f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/logLik.mkinfit.R
\name{logLik.mkinfit}
\alias{logLik.mkinfit}
\title{Calculated the log-likelihood of a fitted mkinfit object}
\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.
}
\description{
This function returns the product of the likelihood densities of each
observed value, as calculated as part of the fitting procedure using
\code{\link{dnorm}}, i.e. assuming normal distribution, and with the means
predicted by the degradation model, and the standard deviations predicted by
the error model.
}
\details{
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.
}
\examples{

  \dontrun{
  sfo_sfo <- mkinmod(
    parent = mkinsub("SFO", to = "m1"),
    m1 = mkinsub("SFO")
  )
  d_t <- subset(FOCUS_2006_D, value != 0)
  f_nw <- mkinfit(sfo_sfo, d_t, quiet = TRUE) # no weighting (weights are unity)
  f_obs <- update(f_nw, error_model = "obs")
  f_tc <- update(f_nw, error_model = "tc")
  AIC(f_nw, f_obs, f_tc)
  }

}
\seealso{
Compare the AIC of columns of \code{\link{mmkin}} objects using
\code{\link{AIC.mmkin}}.
}
\author{
Johannes Ranke
}

Contact - Imprint