aboutsummaryrefslogtreecommitdiff
path: root/R/llhist.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-10-28 13:39:15 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-10-28 13:39:15 +0200
commitf820bf5b91be0f589de16c3e3250f5f79672df75 (patch)
tree2b1406e1c9286634ca017db586e09e2299dec048 /R/llhist.R
parentb1740ade9a1746ccdb325b95915ef88872489f03 (diff)
Rename parhist to parplot and make it generic
That parhist name was not the brightest idea, as it does not show histograms.
Diffstat (limited to 'R/llhist.R')
-rw-r--r--R/llhist.R3
1 files changed, 2 insertions, 1 deletions
diff --git a/R/llhist.R b/R/llhist.R
index 22e3aa08..e158495d 100644
--- a/R/llhist.R
+++ b/R/llhist.R
@@ -25,6 +25,7 @@ llhist <- function(object, breaks = "Sturges", lpos = "topleft", main = "",
stop("llhist is only implemented for multistart.saem.mmkin objects")
}
+ ll_orig <- logLik(attr(object, "orig"))
ll <- stats::na.omit(sapply(object, llfunc))
par(las = 1)
@@ -34,7 +35,7 @@ llhist <- function(object, breaks = "Sturges", lpos = "topleft", main = "",
freq_factor <- h$counts[1] / h$density[1]
- abline(v = logLik(attr(object, "orig")), col = 2)
+ abline(v = ll_orig, col = 2)
legend(lpos, inset = c(0.05, 0.05), bty = "n",
lty = 1, col = c(2),

Contact - Imprint