Description Usage Arguments Value Functions Examples
When comparing values at log scale that have different sd at original scale, better compare log(mean) instead of mu.
1 2 3 | scaleLogToOrig(logmean, sigma)
scaleOrigToLog(mean, sd)
|
logmean |
log of the expected value |
sigma |
standard deviation at log scale |
mean |
expected value at original scale |
sd |
standard deviation at original scale |
numeric matrix with columns mean
, and sd
at original scale
scaleLogToOrig
: get logmean and sigma at log scale
scaleOrigToLog
: get mean and sd at original scale
1 2 3 4 5 6 | xLog <- data.frame(logmean = c(0.8, 0.8), sigma = c(0.2, 0.3))
xOrig <- as.data.frame(scaleLogToOrig(xLog$logmean, xLog$sigma))
xLog2 <- as.data.frame(scaleOrigToLog(xOrig$mean, xOrig$sd))
all.equal(xLog, xLog2)
xLog3 <- as.data.frame(getParmsLognormForMoments(xOrig$mean, xOrig$sd^2))
all.equal(xLog$sigma, xLog3$sigma) # but mu < logmean
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.