Good day,
I am struggling with R and natural logarithm (ln). Firstly, I cannot find a ln(x) function in R. I have noticed that log(x) is the same as ln(x) (when using ln(x) with a calculator).
In R:
log(5) = 1.609438
And with a calculator:
ln(5) = 1.609438
log(5) = 0.69897
I'm trying to fit an equation in R (this is exactly how I found in the literature of 3 references):
y = a + b(x/305) + c(x/305)2 + d ln(305/x) + f ln2(305/x)
Is it correct to use the following syntax in R to use the equation?
y ~ a + b*(x/305) + c*((x/305)^2) + d*log(305/x) + f*(log(305/x))^2
The idea is to use this function with nls() in R. Thanks in advance!
log
in R means the natural logarithm. This is the convention of mathematicians, since "common" logarithms have no mathematical interest. The "ln" abbreviation is something that was introduced to make things less confusing to students. – Varionlog
does. You only need to read the documentation:help("log")
. Your formula looks correct. – Malfeasance