[R] Ryacas

From: Doran, Harold <HDoran_at_air.org>
Date: Thu, 31 Jan 2008 12:01:52 -0500


I'm tinkering around in Ryacas trying to find an easy way to get the first and second partial derivatives of mu and sigma from a normal distribution (actually a bitterly ugly likelihood but this example works for now).

I've done all of the work in Mathematica, but I then need to manually write R code whereas I think Ryacas will give me the expression such that I can export for Tex and produce code I can use for a function. Is there a way I can use Ryacas with built in functions, like dnorm?

For example, I can define the normal and then use the D function as:

ndist<-expression( (1/(s*sqrt(2*pi))) * exp(- ((x-u)^2/(2*s^2)))) D(ndist, "u")

But, I don't see in the vignette a way to use dnorm?



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 31 Jan 2008 - 17:10:35 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 31 Jan 2008 - 19:30:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive