Displaying 9 results from an estimated 9 matches for "secant".
Did you mean:
scant
2010 Aug 25
4
Secant Method Convergence (Method to replicate Excel XIRR/IRR)
Hi,
I am new to R, and as a first exercise, I decided to try to implement an XIRR function using the secant method. I did a quick search and saw another posting that used the Bisection method but wanted to see if it was possible using the secant method.
I would input a Cash Flow and Date vector as well as an initial guess. I hardcoded today's initial date so I could do checks in Excel. This code...
2010 Dec 21
3
how to see what's wrong with a self written function?
Hi all,
I am writing a simple function to implement regularfalsi (secant) method.
###################################################
regulafalsi=function(f,x0,x1){
x=c()
x[1]=x1
i=1
while ( f(x[i])!=0 ) {
i=i+1
if (i==2) {
x[2]=x[1]-f(x[1])*(x[1]-x0)/(f(x[1])-f(x0))
} else {
x[i]=x[i-1]-f(x[i-1])*(x[i-1]-x[i-2])/(f(x[i-1])-f(x[i-2]))
}
}
x[i]
}
###...
2013 Apr 01
2
Is DUD available in nls()?
SAS has DUD (Does not Use Derivatives)/Secant Method for nonlinear
regression, does R offer this option for nonlinear regression?
I have read the helpfile for nls() and could not find such option, any
suggestion?
Thanks,
Derek
[[alternative HTML version deleted]]
2012 Nov 08
3
vectorized uni-root?
dear R experts--- I have (many) unidimensional root problems. think
loc.of.root <- uniroot( f= function(x,a) log( exp(a) + a) + a,
c(.,9e10), a=rnorm(1) ) $root
(for some coefficients a, there won't be a solution; for others, it
may exceed the domain. implied volatilities in various Black-Scholes
formulas and variant formulas are like this, too.)
except I don't need 1 root, but a
2011 Sep 22
1
nlm's Hessian update method
Hi R-help!
I'm trying to understand how R's nlm function updates its estimate of the Hessian matrix. The Dennis/Schnabel book cited in the references presents a number of different ways to do this, and seems to conclude that the positive-definite secant method (BFGS) works best in practice (p201). However, when I run my code through the optim function with the method as "BFGS", slightly different estimates are produced to that of nlm:
> optim(strt,jointll2,method="BFGS",hessian=T)$par
-0.4016808 0.6057144 0.374...
2013 Mar 31
1
DUD (Does not Use Derivatives) for nonlinear regression in R?
Hi, All
SAS has DUD (Does not Use Derivatives)/Secant Method for nonlinear
regression, does R offer this option for nonlinear regression?
I have read the helpfile for nls() and could not find such option, any
suggestion?
Thanks,
Derek
[[alternative HTML version deleted]]
2008 Aug 26
2
Problem with Integrate for NEF-HS distribution
I need to calcuate the cumulative probability for the Natural Exponential Family - Hyperbolic secant distribution with a parameter theta between -pi/2 and pi/2. The integration should be between 0 and 1 as it is a probability.
The function "integrate" works fine when the absolute value of theta is not too large. That is, the NEF-HS distribution is not too skewed. However, once the t...
2009 Jul 24
1
how to calculate growth rate of a variable
Dear R Users,
If a variable, say CO2(ppm), is varying with time. Then how to calculate CO2
(ppm) growth rate /a-1
I have CO2 time series (1991-2000), as:
time, year, month, day, hour, min, sec, lat, long, height, CO2
1991.476722 1991 6 24 0 5 0 -38.93 145.15 4270 353.680
1991.476741 1991 6 24 0 15 0 -39.20 145.22 4270 353.950
1991.476747 1991 6 24 0 18 0 -39.43 145.28 4270 353.510
2013 Apr 03
1
DUD (Does not Use Derivatives) for nonlinear
...t; Message-ID:
> <CAErODj_1pK8raHyAme_2Wt5zQZ_HqOhRjQ62bChhkORWbW=o2A at mail.gmail.com>
> Content-Type: text/plain
>
> On Apr 1, 2013 1:10 AM, "qi A" <send2aqi at gmail.com> wrote:
>>
>> Hi, All
>>
>> SAS has DUD (Does not Use Derivatives)/Secant Method for nonlinear
>> regression, does R offer this option for nonlinear regression?
>>
>> I have read the helpfile for nls() and could not find such option, any
>> suggestion?
>>
>
> nelder-mead is default algorithm in optim. It does not use derivatives. dud
&...