[R] deriv3 example on Venables/Ripley page 263
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sun May 6 16:03:11 CEST 2001
On Sun, 6 May 2001, Michael Wang wrote:
> What does it require to run the example on page 263
> of Venables/Ripley book using R 1.3.0?
Time travel and a large dose of optimism!
1) R 1.3.0 is not released, and it is certainly not finished yet.
2) Its deriv3 function is not compatible with that in the S-PLUS MASS
library, in particular it is not currently user-extensible as the V&R
version is.
3) The S-PLUS library MASS contains extensions to the engine behind
S's deriv and MASS's deriv3 to cover this example. If by release time
R's equivalents are user-extensible it would need the extensions to be
written.
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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