From da4bf79b0cf21c815663c01890cb851898a13b52 Mon Sep 17 00:00:00 2001 From: Andre Chalom Date: Mon, 20 Apr 2015 02:25:26 -0300 Subject: [PATCH] Commented out some example code, see issue #5 --- man/fitsad.Rd | 9 ++++++--- man/trueLL.Rd | 30 +++++++++++++++--------------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/man/fitsad.Rd b/man/fitsad.Rd index e765f8c..3c05c11 100644 --- a/man/fitsad.Rd +++ b/man/fitsad.Rd @@ -343,9 +343,12 @@ AICtab(moths.ln, moths.pln, moths.ls, moths.mzsm, weights=TRUE) ## Biomass as abundance variable data(ARN82.eB.apr77) #benthonic marine animals -AR.ln <- fitsad(ARN82.eB.apr77, sad="lnorm", dec.places=2) -AR.g <- fitsad(ARN82.eB.apr77, sad="gamma", dec.places=2) -AR.wb <- fitsad(ARN82.eB.apr77, sad="weibull", dec.places=2) +#AR.ln <- fitsad(ARN82.eB.apr77, sad="lnorm", dec.places=2) +AR.ln <- fitsad(ARN82.eB.apr77, sad="lnorm") +#AR.g <- fitsad(ARN82.eB.apr77, sad="gamma", dec.places=2) +AR.g <- fitsad(ARN82.eB.apr77, sad="gamma") +#AR.wb <- fitsad(ARN82.eB.apr77, sad="weibull", dec.places=2) +AR.wb <- fitsad(ARN82.eB.apr77, sad="weibull") plot(octav(ARN82.eB.apr77)) lines(octavpred(AR.ln)) lines(octavpred(AR.g), col="red") diff --git a/man/trueLL.Rd b/man/trueLL.Rd index b88ba23..2591272 100644 --- a/man/trueLL.Rd +++ b/man/trueLL.Rd @@ -135,23 +135,23 @@ logLik(fitdistr(x, "lognormal")) ## Which is the sum of log of densities sum( dlnorm(x, meanlog=mean(log(x)), sdlog=sd(log(x)), log=TRUE) ) ## Correct log-likelihood -<<<<<<< HEAD -trueLL(x, "lnorm", coef=list(meanlog=mean(log(x)), sdlog=sd(log(x))), -dec.places=1, ) +#<<<<<<< HEAD +#trueLL(x, "lnorm", coef=list(meanlog=mean(log(x)), sdlog=sd(log(x))), +#dec.places=1, ) ## Data in classes -xoc <- octav(x) -xc <- as.numeric(as.character(xoc$octave)) -xb <- 2^(c(min(xc)-1, xc)) -xh <- hist(x, breaks=xb, plot=FALSE) -xll <- trueLL(x, dens="lnorm", breaks = xb, counts = xoc$Freq, - coef = list(meanlog=mean(log(x)), sd=sd(log(x)))) -xp <- diff(plnorm(xh$breaks, mean(log(x)), sd(log(x)))) -xll2 <- sum( rep(log(xp), xh$counts)) -all.equal(xll, xll2) # should be TRUE -======= -trueLL(x, "lnorm", coef=list(meanlog=mean(log(x)), sdlog=sd(log(x))), dec.places=1) ->>>>>>> provisorio +#xoc <- octav(x) +#xc <- as.numeric(as.character(xoc$octave)) +#xb <- 2^(c(min(xc)-1, xc)) +#xh <- hist(x, breaks=xb, plot=FALSE) +#xll <- trueLL(x, dens="lnorm", breaks = xb, counts = xoc$Freq, +# coef = list(meanlog=mean(log(x)), sd=sd(log(x)))) +#xp <- diff(plnorm(xh$breaks, mean(log(x)), sd(log(x)))) +#xll2 <- sum( rep(log(xp), xh$counts)) +#all.equal(xll, xll2) # should be TRUE +#======= +#trueLL(x, "lnorm", coef=list(meanlog=mean(log(x)), sdlog=sd(log(x))), dec.places=1) +#>>>>>>> provisorio } \keyword{methods}