similar to: Two or more dimensional root (Zero) finding

Displaying 20 results from an estimated 400 matches similar to: "Two or more dimensional root (Zero) finding"

2009 Nov 30
3
Question about output from optim
Dear R-users, I am trying to port to R something that I wrote in Matlab to perform model parameter optimization using the Nelder-Mead simplex method (fminsearch). I read the help on ?optim (which seems to be the way to go) as well as a bunch of posts on the topic, but I would like to make sure about something before I spend to much time trying to reproduce something that is not possible. The
2007 Jun 23
1
putting binary files in a package
I have some binaries I would like to distribute with a package (I am not the original author; I have the source code but can't distribute it because it contains _Numerical Recipes_ code. The long-term solution is to replace the code with new code written in R, or in clean C, but in the meantime ...) I'm uncertain both where they ought to go and where they will work (and hoping there
2011 Apr 23
2
Loop and Solver with Black/Scholes-Formula
Hello, for my diploma thesis I need to program a solver for Merton?s respectively Black?s and Scholes? Option pricing formula, which should be achieved for several dates. What I want to do is to estimate the value of a firm?s assets "vA" (x[2] denotes vA) and the option-implied volatility of firm?s assets "sigA" (x[1] denotes sigA) by solving it simultaneous using the Black
2006 Sep 08
1
Computing skewness and kurtosis with the moments package
Hi, I'm a newcomer to R, having previously used SPSS. One problem I have run into is computing kurtosis. A test dataset is here: http://www.whinlatter.ukfsn.org/2401.dat > library(moments) > data <- read.table("2401.dat", header=T) > attach(data) > loglen <- log10(Length) With SPSS, I get Skewness -0.320 Kurtosis -1.138 With R: > skewness(loglen) [1]
1999 Dec 01
2
nlmin
I'm a very recent user of R. I have been adapting my Splus programmes and I found only one (important) problem. There exists no function "nlmin" in R and its substitute, "nlm", does not work well with my kind of problems, sometimes no achieving convergence, other tines "converging" to impossible values. My models are highly nonlinear and are to be estimated by
2008 Apr 22
2
optimization and gradient
Dear all, I am using the functions 'optim' and 'nlminb'. For both, you can provide a function which computes the gradient of the objective function (to enhance speed and precision). In my case, both the objective function and the gradient take time to be computed and share many common computations (similar matrix, products, etc...). Therefore, I have to compute these
2010 Mar 11
4
help about solving two equations
I have two matrix s1 and s2, each of them is 1000*1. and I have two equations: digamma(p)-digamma(p+q)=s1, digamma(q)-digamma(p+q)=s2, and I want to sovle these two equations to get the value of x and y, which are also two 1000*1 matrices. I write a program like this: f <- function(x) { p<- x[1]; q <- x[2]; ((digamma(p)-digamma(p+q)-s1[2,]) )^2 +((digamma(q)-digamma(p+q)-s2[2,]) )^2
1999 Jan 21
2
nlm question
Hello again Is there any way (or an alternative non-linear minimiser) that arguments to the function called in nlm can be passed in version 0.62.4? Like (I believe) nlmin in a well known other program or optimise in R. Do we use global variables? Shurely not! \John -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2010 Apr 29
1
BB package
Hi I would like to solve a system of nonlinear equations below using dfsane function   mn <- 142.36; vr <- 9335.69 ; sk <- 0.81;  kur <- 0.25 test_fn <- function(p) {    f <- rep(NA, length(p))     f[1] <- p[1]*(p [2]+p[3])- mn   f[2] <- - vr + 2*p[1]*p[2]*p[3]*(p[4]-1)+p[1]*(p[2]+p[3])^2   f[3] <- - sk + (p[1]*(p [2]+p[3])^3*(p[1]+1)*(p[1]+2)-6*p[1]*p[2]*p[3]*(p[2]+
2003 Sep 04
3
function is too long to keep source
Dear R users, I am trying to minimise a function using "nlm". I am getting the following error message: "Error: function is too long to keep source" The function is really very long (about 100 A4 pages). Is there anything I could do to solve this problem? At the moment I am using "nlmin" in S-Plus with no problems but I'd prefer to use R. Thank you very
2009 Mar 23
4
newton method
Hi R-users, Does R has a topic on newton's method? Thank you for the info.
2009 Jul 17
6
Solving two nonlinear equations with two knowns
Dear R users, I have two nonlinear equations, f1(x1,x2)=0 and f2(x1,x2)=0. I try to use optim command by minimize f1^2+f2^2 to find x1 and x2. I found the optimal solution changes when I change initial values. How to solve this? BTW, I also try to use grid searching. But I have no information on ranges of x1 and x2, respectively. Any suggestion to solve this question? Thanks, Kate
2008 Apr 25
5
Non-linear system of equations
Hello R users, I am trying to estimate the parameters of a bimodal normal distribution using moments matching, so I have to solve a non-linear system of equations. How can I solve the following simple example? x^2 - y^2 = 6 x ? y = 3 I heard about nlsystemfit, but I don?t know how to run it exactly. I have tried the following code, but it doesn?t really work: f1 <-y~ x[1]^2-x[2]^2-6 f2
2000 Nov 08
3
Strange means of numbers drawn from rpois
Dear all, I think I must be going crazy.... If I do > mean(rpois(1000000, 14)) I get: [1] 13.50420 and again: > mean(rpois(1000000, 14)) [1] 13.49896 > mean(rpois(1000000, 14)) [1] 13.50161 > mean(rpois(1000000, 15)) [1] 14.49250 > mean(rpois(1000000, 15)) [1] 14.49897 > mean(rpois(1000000, 14.5)) [1] 13.99689 > mean(rpois(1000000, 14.5)) [1] 13.9963 This was on a platform
2009 Mar 16
1
Uniroot and Newton-Raphson Anomaly
I have the following function for which I need to find the root of a: f <- function(R,a,c,q) sum((1 - (1-R)^a)^(1/a)) - c * q To give context for the problem, this is a psychometric issue where R is a vector denoting the percentage of students scoring correct on test item i in class j, c is the proportion correct on the test by student k, and q is the number of items on the test in total. I
2010 Nov 21
1
solve nonlinear equation using BBsolve
Hi r-users, I would like to solve system of nonlinear equation using BBsolve function and below is my code.  I have 4 parameters and I have 4 eqns. mgf_gammasum <- function(p) { t  <- rep(NA, length(p)) mn <- 142.36 vr <- 9335.69 sk <- 0.8139635 kur <- 3.252591 rh  <- 0.896 # cumulants k1 <- p[1]*(p[2]+p[3]) k2 <- p[1]*(2*p[2]*p[3]*p[4] +p[2]^2+p[3]^2) k3 <-
2007 Apr 16
1
Find zeros of analytic functions
Dear Partecipants to the list, I am Enrico Foscolo, a student of the Faculty of Statistics, University of Bologna, and I am interested under consideration of the search of zeros of one function. I would want to write a code using the software R. I have already read the book "Computing the Zeros of Analytic Functions" (P. Kravanja and M. Van Barel, 2000) that speaks about this problem,
2009 Jul 23
1
Non-negative solutions to complicated equations
Hi all, I have a system of 3 equations with many defined parameters and 3 variables I need to find solutions to. I actually know the solutions I'm aiming for (0.07,0.287,0.0061) but R tends to give me (0,0,0). I tried the "BB" package but don't really follow how to refine my solutions from that; these are wrong so far. Here's my code from trying that: > f<-function(x){
2006 Aug 31
1
alpha in Holt-Winters method
Hi, I'd like to know if the Holt-Winters function in R can modify the alpha paremeter in an "intelligent" way. I know it can vary from 0 to 1. Wich mathematical formula does it use to calculate the correct value of alpha? Thanks, bye. Carlo
2006 Sep 19
1
help on dirichlet distribution
Dear Gregory R. Warnes, I'm a phd student in statistics, at the University of Milano Bicocca. I'm interested to the methods of estimate the parameters of the Dirichlet distribution. Do you have implemented an algorithm in R? If so, can you give me the script? or, in general, some helps? Best Regards Gianna --------------------------------------------------------------- Gianna Monti