[R] Ryacas

Doran, Harold HDoran at air.org
Thu Jan 31 18:01:52 CET 2008


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? 



More information about the R-help mailing list