[R] deriv3 example on Venables/Ripley page 263

Michael Wang mwang at mindspring.com
Sun May 6 15:17:46 CEST 2001

What does it require to run the example on page 263
of Venables/Ripley book using R 1.3.0?

I got the following error and I have no clue how to correct it.

Thank you very much. (If you reply to the list, please send a
copy to me.)

> lmix2 <- deriv3(
+ ~ -log(p*dnorm((x-u1)/s1)/s1 + (1-p)*dnorm((x-u2)/s2)/s2),
+ c("p", "u1", "s1", "u2", "s2"),
+ function(x, p, u1, s1, u2, s2) NULL)

Error in deriv3.formula(~-log(p * dnorm((x - u1)/s1)/s1 + (1 - p) * dnorm((x -  : 

        Function H is not in the derivatives table
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list