search for: fitk

Displaying 2 results from an estimated 2 matches for "fitk".

Did you mean: fit
2012 Sep 10
0
More help need on Von Bertalanffy Growth Curves
...with all the data sets but its just assumption checking so I did this manually. > fitGen <- nls(vbGen,data=BLG,start=svGen) Error in nlsModel(formula, mf, start, wts) :   singular gradient matrix at initial parameter estimates and This code is only not working with this data set. > fitK <- nls(vbK,data=BLG,start=svK) Error in numericDeriv(form[[3L]], names(ind), env) :   Missing value or an infinity produced when evaluating the model Thanks, April Here is all my code and my data set:  Data set: structure(list(Length = c(60.96, 60.96, 63.5, 63.5, 66.04, 66.04, 71.12, 71....
2003 Aug 26
1
Getting out of an embedded function safely - use try?
...into nls? Thanks for any tips, Andy #example foo.one <- (1 * exp(-0.07 * 1:100) + 0.5) + rnorm(100, 0, 0.05) foo.two <- (1 * exp(-0.000000001 * 1:100) + 0.5) + rnorm(100, 0, 0.05) try.to.fit <- function(aVector){ toy.model <- nls(aVector ~ FitA * exp(FitNegB * 1:length(aVector)) + FitK, start = list( FitA = 0.75, FitNegB = -0.02, FitK = 0.4), control = nls.control(maxiter=1000, tol=1e-05, minFactor=1/1024)) return(fitted.values(toy.model)) } try.to.fit(foo.one) try.to.fit(foo.two)