Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

FinneyCorr

Finney's correction to log normally distributed data, r-squared and standard deviation of a linear model.


Description

FinneyCorr: Finney's correction factor K in x = e^(ln x) * K (see Note), to be used if ln x is normally distributed with standard deviation s_ln x.

Usage

FinneyCorr(s,n)
  FC.lm(lmobj)
  R2.lm(lmobj)
  s.lm(lmobj)
  summaryFs(lmobj)

Arguments

s

Standard deviation s_ln of log data, in note.

n

Number of data points.

lmobj

Result of an lm(log(y) ~ .)

Value

FinneyCorr Finney's correction from standard deviation and degrees of freedom. FC.lm Finney's correction from lmobj. R2.lm R-squared from lmobj . s.lm Comprehensive output from lmobj.

Note

K := e^{s_{\ln}^2/2} \, ≤ft\{1-\frac{s_{\ln}^2}{4n}(s_{\ln}^2+2)+\frac{s_{\ln}^4}{96n^2}(3s_{\ln}^4+44s_{\ln}^2+84) \right\}

Author(s)

Christian W. Hoffmann <christian@echoffmann.ch>

References

Finney D.J., 1941. On the distribution of a variable whose logarithm is normally distributed. J. R. Stat. Soc., B 7: 155-161

Examples

FinneyCorr(0.346274,24+3)  #  1.059306936

ok <- RNGkind()
RNGkind(kind = "default", normal.kind = "default")
set.seed(2009, kind = "default")
x <- rnorm(1000); y <- 0.1*rnorm(1000)
## Reset:
RNGkind(ok[1])

lmo <- lm(y ~ x)
FC.lm(lmo)  # 1.00472
R2.lm(lmo)  # 6.1926e-05
s.lm(lmo)   # 0.0970954

cwhmisc

Miscellaneous Functions for Math, Plotting, Printing, Statistics, Strings, and Tools

v6.6
GPL (>= 2)
Authors
Christian W. Hoffmann
Initial release
2018-08-24, 10:40:10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.