Displaying 1 result from an estimated 1 matches for "fitcode".
Did you mean:
bitcode
2006 Jan 08
1
confint/nls
...b+rnorm(npts,sd=0.05)
c = 1.0
y3 = a*(x+c)^b+rnorm(npts,sd=0.05)
d = 0.5
y4 = a*(x^d+c)^b+rnorm(npts,sd=0.05)
testfit <- function(model,start,alg) {
tryfit <- try(fit <-
nls(model,start=start,algorithm=alg,control=list(maxiter=200)))
if (class(tryfit)!="try-error") {
fitcode="OK"
tryci <- try(confint(fit))
if (class(tryci)!="try-error") {
cicode="OK"
} else cicode = as.character(tryci)
} else {
fitcode = as.character(tryfit)
cicode="?"
}
c(fitcode,cicode)
}
m1 = c(y~x^b,y2~a*x^b,y3~a*(...