similar to: Symbolic differentiation ("D","deriv", etc.) (PR#1928)

Displaying 20 results from an estimated 1000 matches similar to: "Symbolic differentiation ("D","deriv", etc.) (PR#1928)"

2005 Mar 02
1
Warning: number of items to replace is not a multiple of replacement length
I feel like a complete dolt, as I know this question has been asked by others on a fairly regular basis, but I'm going in circles trying to get the following to work: id.prob<-function (tt) { library(mvtnorm) #============================ Makeham<-function(tt) { a2=0.030386513 a3=0.006688287 b3=0.039047537 t<-tt-20 h.t<-a2+a3*exp(b3*t) S.t<-exp(-a2*t+a3/b3*(1-exp(b3*t)))
2010 Mar 26
1
how to read this special form of data
Dear R listers, I have a data file looks like the following: Testing marker: s_1 --------------------------------------------- Allele df(0) -LnLk(0) df(T) -LnLk(T) ChiSq p 3 7995 29320.30 7994 29311.85 16.90 4e-05 (2229/8000 probands) Testing marker: s_2 --------------------------------------------- Allele df(0)
2012 Jan 12
2
Function accepted by optim but not mle2 (?)
Dear Sir/ Madam, I'm having trouble de-bugging the following - which works perfectly well with optim or optimx - but not with mle2. I'd be really grateful if someone could show me what is wrong. Many thanks in advance. JSC: gompertz<- function (x,t=data) { a3<-x[1] b3<-x[2] shift<-data[1] h.t<-a3*exp(b3*(t-shift))
2012 Apr 16
0
Gompertz-Makeham hazard models---test for significant difference
Hi, all. I'm working with published paleodemographic data (counts of skeletons that have been assigned into an age-range category, based upon observed morphological characteristics). For example, the following is the age distribution from a prehistoric cemetery in Egypt: naga <-
2007 May 13
1
symbollic differentiation in R
Hi all, I wrote a symbollic differentiation function in R, which can be downloaded here: http://www.econ.upenn.edu/~clausen/computing/Deriv.R http://www.econ.upenn.edu/~clausen/computing/Simplify.R It is just a prototype. Of course, R already contains two differentiation functions: D and deriv. However, these functions have several limitations. They can probably be fixed, but
2005 May 05
2
Numerical Derivative / Numerical Differentiation of unkno wn funct ion
Ah... I searched for half an hour for this function... you know, the help function in R could really be a lot better... But wait a minute... looking at this, it appears you have to pass in an expression. What if it is an unknown function, where you only have a handle to the function, but you cannot see it's implementation ? Will this work then ? -----Original Message----- From: Berton Gunter
2005 May 05
2
Numerical Derivative / Numerical Differentiation of unknown funct ion
Hi, I have been trying to do numerical differentiation using R. I found some old S code using Richardson Extrapolation which I managed to get to work. I am posting it here in case anyone needs it. ######################################################################## richardson.grad <- function(func, x, d=0.01, eps=1e-4, r=6, show=F){ # This function calculates a numerical approximation
2007 Aug 20
3
Differentiation
Hi, Could anyone tell me what is the command used in R to do 1. Differentiation 2. Newton Raphson method (Numerical Analysis in general...) Are there any packages separately for this? Thanks for your help! BR, Shubha [[alternative HTML version deleted]]
2008 May 07
1
algorithmic or automatic differentiation
Hi R People: Is there a package for automatic differentiation, please? thanks in advance, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodgess at gmail.com
2009 Jul 22
2
Automatic differentiation in R
Hi I recently gave a presentation about Automatic Differentiation (AD) and R at the Eighth Euro AD Workshop in Oxford (17/07/09). The presentation was intended as a general introduction to R and the desire for a generic AD interface for R. During the presentation I emphasised the need and the high level of interest that the R community has in developing such an interface and that input from the
2002 Aug 10
0
?subexpressions, D, deriv
Hi all, I am not used to using the computer to do calculus and have up to now done my differentiation "by hand" , calling on skills I learned many years ago and some standard cheat sheets. My interest at present is in getting the second derivative of a gaussian, which I did by hand and results in a somewhat messy result involving terms in sigma^5 .. I have done some spot checks
2012 Jan 03
1
higher derivatives using deriv
Dear everyone, the following is obviously used to compute the nth derivative, which seems to work (deriv(sqrt(1 - x^2),x,n)) However, before using this, I wanted to make sure it does what I think it does but can't figure it out when reading the ?deriv info or any other documentation on deriv for that matter: deriv(expr, namevec, function.arg = NULL, tag = ".expr", hessian = FALSE,
2011 Apr 04
1
Deriving formula with deriv
Dear list, Hi, I am trying to get the second derivative of a logistic formula, in R summary the model is given as : ### >$nls >Nonlinear regression model >model: data ~ logistic(time, A, mu, lambda, addpar) >data: parent.frame() > A mu lambda >0.53243 0.03741 6.94296 ### but I know the formula used is #
2009 May 19
0
Automatic Differentiation for R
Martin (see below) gives a good explanation of the difference between AD and symbolic differentiations. I'm of the opinion we can use both. However, the real issue as far as I'm concerned (from an optimizer's point of view, which may also be that of ODE and PDE folk) is that right now none of the offerings that we have are easy to use. Indeed, usability is one of the key issues in my
2010 Jul 29
2
how to get higher derivatives with "deriv"
Dear ExpeRts, I have trouble implementing a function which computes the k-th derivative of a specified function f and returns it as a function. I tried to adapt what I found under ?deriv but could not get it to work. Here is how it should look like: ## specify the function f <- function (x,alpha) x^alpha ## higher derivatives DD <- function(expr, variable, order = 1) { if(order <
2012 Mar 05
0
[LLVMdev] LLVM for automatic differentiation or linear algebra?
Dear all, I am the author of an open-source package for mathematical optimization and automatic differentiation called CasADi (www.casadi.org) and have recently started realize the potential of the LLVM project. At the core of CasADi are two fast interpretors for mathematical expressions and I'm now planning to complement these with JIT-compilation using LLVM. Does anyone know if there is
2009 Feb 18
1
interior point methods, automatic differentiation in R
Dear all, I'm wondering if there are some ongoing projects for interior point methods in R (e.g. linking ipopt from Coin written in C++ to R) and for automatic differentiation in R (e.g. linking openAD available in C++ and Fortran) ? Many thanks, David [[alternative HTML version deleted]]
2008 Jan 26
1
Any numeric differentiation routine in R for boundary points?
Hi, I have a scalar valued function with several variables. One of the variables is restricted to be non-negative. For example, f(x,y)=sqrt(x)*exp(y), then x should be non-negative. I need the gradient and hessian for some vector (0,y), i.e., I need the gradient and hessian at the boudary of parameter space. The "numderiv" package does not work, even for f(x)=sqrt(x), if you do
2012 Mar 12
0
[LLVMdev] LLVM for automatic differentiation or linear algebra?
Hi, no-one else has said anything more pertinent so here's my two-pence. I have been thinking for a while about LLVM in the context of simulating _small_ stochastic systems by which I mean very much non-trivial stochastic transition functions, but still small enough that if compiled carefully down to machine code via LLVM with a good chance that they'll be faster. (With even
2009 Mar 07
4
multivariate integration and partial differentiation
Could somebody share some tips on implementing multivariate integration and partial differentiation in R? For example, for a trivariate joint distribution (cumulative density function) of F(x,y,z), how to differentiate with respect to x and get the bivariate distribution (probability density function) of f(y,z). Or integrate f(x,y,z) with respect to x to get bivariate distribution of (y,z). Your