search for: tblparamsforonespeci

Displaying 1 result from an estimated 1 matches for "tblparamsforonespeci".

Did you mean: tblparamsforonespecies
2011 Oct 18
2
Non-linear maximization function in R
...tors I get quite a different result. I'm very confident that this equation is working properly. I would expect the outputs of this function to be roughly equivalent to the results from object "p" as seen above, but they don't look similar at all. I'm not sure what this means. tBLparamsForOneSpecies <- function(theData) { x <- theData[ ,1] y <- theData[ ,2] logitReg <- glm(y ~ x + I(x^2), family=binomial) b0 <- logitReg$coefficients[1] b1 <- logitReg$coefficients[2] b2 <- logitReg$coefficients[3] opt <- (-b1)/(2*b2) tol <- 1 / sqrt(-2*b2) pmax<-1/(1+exp...