similar to: Numerical Derivative / Numerical Differentiation of unkno wn funct ion

Displaying 20 results from an estimated 2000 matches similar to: "Numerical Derivative / Numerical Differentiation of unkno wn funct ion"

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
2006 Mar 12
2
Numerical Derivatives in R
Hi, Suppose I have an arbitrary function: arbfun<-function(x) {...} Is there a robust implementation of a numerical derivative routine in R which I can use to take it's derivative ? Something a bit more than simple division by delta of the difference of evaluating the function at x and x+delta... Perhaps there is a way to do this using D or deriv but I could not figure it out.
2006 Feb 16
2
Problem with scoping a variable value
Hi there, I have a function which has a variable called show as an input: richardson.grad <- function(func, x, d=0.01, eps=1e-4, r=6, show=F){ # do some things if(show) { cat("\n","first order approximations", "\n") print(a.mtr, 12) } #do more things and return } The show variable is being used as a flag to show intermediate
2010 Jul 06
2
numerical derivative R help
I fit my CDF to sum of exponentials and now I want to take the numerical derivative of this function to obtain probability density.I will really appreciate your help reagrding the error messages I am getting which I don't understand. * * > fitterma <- function(xtime) { a <- -0.09144115 b <- -0.01335756 c <- -2.368057 d <- -0.00600052
2005 Apr 10
0
Re: beta distribution in terms of it's mean and standarddeviation
For three of the beta distribution functions in R the parameters defining the distribution are alpha, beta and 'ncp'. Pretty trivially, there is no bijection between these three and the mean and variance, but for the special case of ncp = 0, I think there is. Rather than just write it down, it's probably a good idea to see how to get it. Note that mu = alpha/(alpha+beta) s2 =
2003 Jul 16
2
numerical differentiation in R? (for optim "SANN" parscale)
Dear R users, I am running a maximum likelihood model with optim. I chose the simulated annealing method (method="SANN"). SANN is not performing bad, but I guess it would be much more effecive if I could set the `parscale' parameter. The help sais: `parscale' A vector of scaling values for the parameters. Optimization is performed on `par/parscale' and these
2008 Sep 09
2
Information on the number of CPU's
Dear R Users, I am on Windows XP SP2 platform, using R version 2.7.2 . I was wondering if there is a way to find out, within R, the number of CPU's on my machine ? I would use this information to set the number of nodes in a cluster, depending on the machine. Sys.info() and .Platform do not carry this information. Thanks in advance, Tolga Uzuner Generally, this communication is for
2004 Apr 28
4
numericDeriv
Dear All, I am trying to solve a Generalized Method of Moments problem which necessitate the gradient of moments computation to get the standard errors of estimates. I know optim does not output the gradient, but I can use numericDeriv to get that. My question is: is this the best function to do this? Thank you Jean,
2006 Nov 13
1
Question on applying vectors to data.frames by row
# Newbie alert # I am wanting to multiply the rows in a dataframe by a vector. # However, the default behavior appears to be for the vector to be applied # column wise. For example: vct <- 1:4 df <- data.frame(c1 = 5:10, c2= 6:11, c3=7:12, c4=8:13) multTheTwo <- vct * df multTheTwo # This results in the vector getting cycled columnwise # c1 c2 c3 c4 # 1 5 18 7 24 # 2 12 28 16 36 # 3
2006 Apr 10
3
form_remote_tag : additional onsubmit funct. possible ?
Is there a way to add onsubmit functionality to a form_remote_tag with an additional javascript directive? eg I''d like for an inline javascript to make the form''s div container hidden as soon as the button is pressed to avoid having it possibly get pressed again ( sometimes the rails response is slow enough for a user to think they need to re-press it ). example: <div
2016 Mar 08
0
Can anyone compile mtr source RPM on CentOS 6.7?
It built just fine in mock, results here http://li.nux.ro/download/nux/tmp/mtr6/ -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro ----- Original Message ----- > From: "Digimer" <lists at alteeve.ca> > To: "CentOS mailing list" <centos at centos.org> > Sent: Tuesday, 8 March, 2016 00:05:59 > Subject: [CentOS] Can anyone compile
2016 Mar 08
2
Can anyone compile mtr source RPM on CentOS 6.7?
Hi all, I was trying to rebuild mtr (http://vault.centos.org/6.7/os/Source/SPackages/mtr-0.75-5.el6.src.rpm) and I keep getting: ==== Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.gu9Ds0 + umask 022 + cd /root/rpmbuild/BUILD + '[' /root/rpmbuild/BUILDROOT/mtr-0.75-5.el6.x86_64 '!=' / ']' + rm -rf /root/rpmbuild/BUILDROOT/mtr-0.75-5.el6.x86_64 ++ dirname
2016 Mar 08
3
Can anyone compile mtr source RPM on CentOS 6.7?
I'm not surprised, given that it is in the repo. That's why I was asking if anyone tried building it themselves and, if so, did they have the same issue as I describe below? Alternatively, any tips/advice on solving my build issue would be helpful. digimer On 07/03/16 07:29 PM, Nux! wrote: > It built just fine in mock, results here > http://li.nux.ro/download/nux/tmp/mtr6/ >
2005 Sep 25
2
getting variable length numerical gradient
Hi all. I have a numerical function f(x), with x being a vector of generic size (say k=4), and I wanna take the numerically computed gradient, using deriv or numericDeriv (or something else). My difficulties here are that in deriv and numericDeric the function is passed as an expression, and one have to pass the list of variables involved as a char vector... So, it's a pure R programming
2016 Mar 08
0
Can anyone compile mtr source RPM on CentOS 6.7?
On 08/03/16 11:36 AM, James Hogarth wrote: > On 8 March 2016 at 16:15, Digimer <lists at alteeve.ca> wrote: > >> On 08/03/16 07:11 AM, James Hogarth wrote: >>> On 8 March 2016 at 10:07, Leon Fauster <leonfauster at googlemail.com> >> wrote: >>> >>>> Am 08.03.2016 um 01:50 schrieb Digimer <lists at alteeve.ca>: >>>>>
2016 Mar 08
0
Can anyone compile mtr source RPM on CentOS 6.7?
On 08/03/16 01:51 PM, James Hogarth wrote: > On 8 March 2016 at 17:22, Digimer <lists at alteeve.ca> wrote: > >> On 08/03/16 11:36 AM, James Hogarth wrote: >>> On 8 March 2016 at 16:15, Digimer <lists at alteeve.ca> wrote: >>> >>>> On 08/03/16 07:11 AM, James Hogarth wrote: >>>>> On 8 March 2016 at 10:07, Leon Fauster
2016 Mar 08
0
Can anyone compile mtr source RPM on CentOS 6.7?
On 08/03/16 02:08 PM, James Hogarth wrote: > On 8 March 2016 at 19:02, Digimer <lists at alteeve.ca> wrote: > >> On 08/03/16 01:51 PM, James Hogarth wrote: >>> On 8 March 2016 at 17:22, Digimer <lists at alteeve.ca> wrote: >>> >>>> On 08/03/16 11:36 AM, James Hogarth wrote: >>>>> On 8 March 2016 at 16:15, Digimer <lists at
2005 Nov 16
2
numericDeriv
I have to compute some standard errors using the delta method and so have to use the command "numericDeriv" to get the desired gradient. Befor using it on my complicated function, I've done a try with a simple exemple : x <- 1:5 numericDeriv(quote(x^2),"x") and i get : [1] 1 8 27 64 125 216 attr(,"gradient") [,1] [,2] [,3] [,4] [,5] [,6] [1,] Inf
2008 Nov 15
1
Problems with rbind
Dear R Users, A recent update on base packages on my R installation has introduced a problem to my code which did not exist before the update. The offending function is rbind, which fails where it was working just fine before the update. I have two zoo objects, foo and bar, indexed by class Date. foo starts from "2007-10-09" and bar from "2007-10-10". I attempt to pad
2020 Jun 15
2
numericDeriv alters result of eval in R 4.0.1
Dear R developers, I've run into a weird behavior of the numericDeriv function (from the stats package) which I also posted on StackOverflow (question has same title as this email, except for the version of R). Running the code bellow we can see that the numericDeriv function gives an error as the derivative of x^a wrt a is x^a * log(x) and log is not defined for negative numbers. However,