Wagner Bonat wbo...@gmail.com
on Wed, 23 Apr 2014 12:12:17 +0200 writes:
Hi all !
I am look for some efficient method to compute the derivative of
exponential matrix function in R. For example, I have a simple matrix like
log.Sigma - matrix(c(par1, rho, rho, par2),2,2)
Hi all !
I am look for some efficient method to compute the derivative of
exponential matrix function in R. For example, I have a simple matrix like
log.Sigma - matrix(c(par1, rho, rho, par2),2,2)
require(Matrix)
Sigma - expm(log.Sigma)
I want some method to compute the derivatives of Sigma
This is not a homework. I just want to see if there are some R functions or
some ideas I can borrow to solve my problem.
--
View this message in context:
http://r.789695.n4.nabble.com/Derivative-of-a-function-tp3631814p3633071.html
Sent from the R help mailing list archive at Nabble.com.
On Jun 29, 2011, at 10:48 AM, Lisa wrote:
This is not a homework. I just want to see if there are some R
functions or
some ideas I can borrow to solve my problem.
There is a deriv function that provides limited support for symbolic
differentiation.
The Rhelp list is advertised (
On Tue, Jun 28, 2011 at 10:03 PM, Lisa lisa...@gmail.com wrote:
Dear all,
I just want to get the derivative of a function that looks like:
y = exp(x1*b) / (exp(x1*b) + exp(x2*b))
where y is a scalar, x1, x2, and b are vectors. I am going to take the
derivative of b with respect to y, but I
On 30/06/11 06:16, Gabor Grothendieck wrote:
On Tue, Jun 28, 2011 at 10:03 PM, Lisalisa...@gmail.com wrote:
Dear all,
I just want to get the derivative of a function that looks like:
y = exp(x1*b) / (exp(x1*b) + exp(x2*b))
where y is a scalar, x1, x2, and b are vectors. I am going to take
Yes. I need to do implicit differentiation. After rearrangement, I got
(x2 – x1) * b = log(1 / y - 1)
Take derivative of both sides with respect to y, I have
(x2 – x1) * b’[y] = - 1/y(1-y)
Since both (x2 – x1) and b’[y] are vectors, I cannot move (x2 – x1) to
RHS. This is why I posted my
On Wed, Jun 29, 2011 at 4:35 PM, Lisa lisa...@gmail.com wrote:
Yes. I need to do implicit differentiation. After rearrangement, I got
(x2 – x1) * b = log(1 / y - 1)
Take derivative of both sides with respect to y, I have
(x2 – x1) * b’[y] = - 1/y(1-y)
Since both (x2 – x1) and b’[y] are
...@gmail.com]
Sent: 29 June 2011 21:35
To: r-help@r-project.org
Subject: Re: [R] Derivative of a function
Yes. I need to do implicit differentiation. After rearrangement, I got
(x2 – x1) * b = log(1 / y - 1)
Take derivative of both sides with respect to y, I have
(x2 – x1) * b’[y] = - 1/y(1-y)
Since both
Dear all,
I just want to get the derivative of a function that looks like:
y = exp(x1*b) / (exp(x1*b) + exp(x2*b))
where y is a scalar, x1, x2, and b are vectors. I am going to take the
derivative of b with respect to y, but I cannot derive an expression in
which b is function of y. I know
(1) You really ought to do your own homework.
(2) What has this to do with R?
cheers,
Rolf Turner
On 29/06/11 14:03, Lisa wrote:
Dear all,
I just want to get the derivative of a function that looks like:
y = exp(x1*b) / (exp(x1*b) + exp(x2*b))
where y is a scalar, x1, x2, and
This following works for me but I still favor the quick and dirty method
suggested originally by David.
options(scipen = 10)
x - seq(0,2, by = .01)
f - expression(5*cos(2*x)-2*x*sin(2*x))
D(f, 'x')
f.prime - function(x){
-(5 * (sin(2 * x) * 2) + (2 * sin(2 * x) + 2 * x * (cos(2 * x) *
How would I numerically find the x value where the derivative of the function
below is zero?
x - seq(1,2, by = .01)
y - 5*cos(2*x)-2*x*sin(2*x)
plot(x,abs(y), type = l, ylab = |y|)
__
R-help@r-project.org mailing list
On Aug 11, 2010, at 9:21 PM, TGS wrote:
How would I numerically find the x value where the derivative of the
function below is zero?
x - seq(1,2, by = .01)
y - 5*cos(2*x)-2*x*sin(2*x)
plot(x,abs(y), type = l, ylab = |y|)
Two ideas:
---minimize abs(diff(y))
abline(v=x[which.min(abs(
Hi:
Try the following:
f - function(x) 5*cos(2*x)-2*x*sin(2*x)
curve(f, -5, 5)
abline(0, 0, lty = 'dotted')
This shows rather clearly that your function has multiple roots, which isn't
surprising given that it's a linear combination of sines and cosines. To
find a specific root numerically, use
On Aug 12, 2010, at 12:49 AM, Dennis Murphy wrote:
Hi:
Try the following:
f - function(x) 5*cos(2*x)-2*x*sin(2*x)
curve(f, -5, 5)
abline(0, 0, lty = 'dotted')
This shows rather clearly that your function has multiple roots,
which isn't
surprising given that it's a linear combination of
Is there a function to compute the derivative of the probit (qnorm) function
in R, or in any of the packages?
Thanks,
-Andrew
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
f-function(x) 1/dnorm(qnorm(x))
for x in (0,1)
-tgs
On Thu, May 6, 2010 at 4:40 PM, Andrew Redd ar...@stat.tamu.edu wrote:
Is there a function to compute the derivative of the probit (qnorm)
function
in R, or in any of the packages?
Thanks,
-Andrew
[[alternative HTML version
On 06-May-10 20:40:30, Andrew Redd wrote:
Is there a function to compute the derivative of the probit (qnorm)
function
in R, or in any of the packages?
Thanks,
-Andrew
I don't think so (though stand to be corrected). However, it would
be straightforward to write one.
For simplicity of
Hi Fir,
you can alternatively use local regression, implemented in the package locfit,
which can also estimate derivatives:
library(locfit)
attach(cars)
# main fit
fit - locfit( dist ~ speed )
# fit 1st derivative
fitd - locfit( dist ~ speed , deriv =1)
# plots...
plot(speed, dist )
lines(fit)
While this doesn't answer your question, I want to let you know that there
is a proposal for a related improvement within R that will let users compute
(numerically) the derivatives, of any order, of a given function inside of
R. In your case, this means that you will write the smooth spline
Dear All,
I've been searching for appropriate codes to compute the rate of change and the
curvature of nonparametric regression model whish was denoted by a smooth
function but unfortunately don't manage to do it. I presume that such
characteristics from a smooth curve can be determined by
,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University
Ph. (410) 502-2619
email: rvarad...@jhmi.edu
- Original Message -
From: FMH kagba2...@yahoo.com
Date: Friday, April 2, 2010 4:39 am
Subject: [R] Derivative of a smooth function
To: r-help@r-project.org
Thank you
- Original Message
From: spencerg spencer.gra...@prodsyse.com
To: Liaw, Andy andy_l...@merck.com
Cc: Rolf Turner r.tur...@auckland.ac.nz; FMH kagba2...@yahoo.com;
r-help@r-project.org
Sent: Wednesday, September 9, 2009 3:08:43 PM
Subject: Re: [R] Derivative of nonparametric
From: Rolf Turner
On 8/09/2009, at 9:07 PM, FMH wrote:
Dear All,
I'm looking for a way on computing the derivative of first and
second order of a smoothing curve produced by a nonprametric
regression. For instance, if we run the R script below, a smooth
nonparametric
This may be overkill for your application, but you might be
interested in the fda package, for which a new book appeared a couple
of months ago: Functional Data Analysis with R and Matlab (Springer
Use R! series, by Ramsay, Hooker and Graves; I'm the third author).
The package includes
Dear All,
I'm looking for a way on computing the derivative of first and second order of
a smoothing curve produced by a nonprametric regression. For instance, if we
run the R script below, a smooth nonparametric regression curve is produced.
provide.data(trawl)
Zone92 - (Year == 0 Zone ==
On 8/09/2009, at 9:07 PM, FMH wrote:
Dear All,
I'm looking for a way on computing the derivative of first and
second order of a smoothing curve produced by a nonprametric
regression. For instance, if we run the R script below, a smooth
nonparametric regression curve is produced.
28 matches
Mail list logo