Displaying 1 result from an estimated 1 matches for "atot2".
Did you mean:
atot
2008 Apr 12
1
R and Excel disagreement - Goal Seek versus uniroot
...iologically
sensible. Using "goal seek" in Excel my friend found another plausible
root, quite close to zero, and a plot of the function fd below shows
that it may be about OK - but Excel fails to find the plausible root
indicated by uniroot.
fd <- function(H,SID,KA1,KA2,ATOT1,ATOT2){
H^4+H^3*(SID+KA1+KA2)+H^2*(SID*(KA1+KA2)+KA1*KA2-ATOT1*KA1-ATOT2*KA2-kw)+
H*(SID*KA1*KA2-KA1*KA2*(ATOT1+ATOT2)-kw*(KA1+KA2))-kw*KA1*KA2}
KA1 <- 1e-6;KA2 <- 1e-5;ATOT1 <- 0.05; ATOT2 <- 0.03; SID <-
0.05;kw <- 4.4e-14
options(digits=20)
uniroot(fd,c(0,1)...