search for: ltlnorm

Displaying 1 result from an estimated 1 matches for "ltlnorm".

Did you mean: llnorm
2010 Apr 28
0
Truncated Lognormal Distribution
...- http://finzi.psych.upenn.edu/Rhelp10/2008-October/176136.html) library(MASS) x <- c(600.62,153.05,70.26,530.42,3440.29,97.45,174.51,168.47, 116.63,36.51, 219.77, 231.67,110.62,173.11,202.85,689.27,23.82,234.15,625.89,192.88,29.53,109.99, 80.53, 46.85,82.69,231.53,75.38,217.52,85.29,182.18) ltlnorm <- function(x, meanlog, sdlog, log=FALSE) { dlnorm(x, meanlog, sdlog, log = FALSE) / plnorm(1, meanlog, sdlog, lower.tail = TRUE, log.p = FALSE) } meanlog = mean(log(x)) sdlog = sd(log(x)) ltlnormfit <- fitdistr(x,ltlnorm, start=list(meanlog,sdlog)) I get following error - Error in dln...