Ah, now I see...
Thanks very much :)
On Sat, Oct 01, 2011 at 09:27:34AM -0400, Gabor Grothendieck wrote:
> On Sat, Oct 1, 2011 at 5:28 AM, Casper Ti. Vector
> wrote:
> Its linear given c so calculate the residual sum of squares using lm
> (or lm.fit which is faster) given c and optimize over c:
>
On Sat, Oct 1, 2011 at 9:27 AM, Gabor Grothendieck
wrote:
> On Sat, Oct 1, 2011 at 5:28 AM, Casper Ti. Vector
> wrote:
>> Example:
>>
>>> f <- function(x) { 1 + 2 * log(1 + 3 * x) + rnorm(1, sd = 0.5) }
>>> y <- f(x <- c(1 : 10)); y
>> [1] 4.503841 5.623073 6.336423 6.861151 7.276430 7.620131 7.
On Sat, Oct 1, 2011 at 5:28 AM, Casper Ti. Vector
wrote:
> Example:
>
>> f <- function(x) { 1 + 2 * log(1 + 3 * x) + rnorm(1, sd = 0.5) }
>> y <- f(x <- c(1 : 10)); y
> [1] 4.503841 5.623073 6.336423 6.861151 7.276430 7.620131 7.913338 8.169004
> [9] 8.395662 8.599227
>> nls(x ~ a + b * log(1 +
Example:
> f <- function(x) { 1 + 2 * log(1 + 3 * x) + rnorm(1, sd = 0.5) }
> y <- f(x <- c(1 : 10)); y
[1] 4.503841 5.623073 6.336423 6.861151 7.276430 7.620131 7.913338 8.169004
[9] 8.395662 8.599227
> nls(x ~ a + b * log(1 + c * x), start = list(a = 1, b = 2, c = 3), trace =
> TRUE)
37.22954
4 matches
Mail list logo