similar to: Fwd: Re: Nonlinear equation

Displaying 20 results from an estimated 10000 matches similar to: "Fwd: Re: Nonlinear equation"

2007 Jun 20
4
finding roots of multivariate equation
Hello, I want to find the roots of an equation in two variables. I am aware of the uniroot function, which can do this for a function with a single variable (as I understand it...) but cannot find a function that does this for an equation with more than one variable. I am looking for something implementing similar to a Newton-Raphson algorithm. Thanks. -- Bill Shipley North American Editor for
2008 Apr 23
1
BB - a new package for solving nonlinear system of equations and for optimization with simple constraints
Hi, We (Paul Gilbert and I) have just released a new R package on CRAN called "BB" (stands for Barzilai-Borwein) that provides functionality for solving large-scale (and small-scale) nonlinear system of equations. Until now, R didn't have any functionality for solving nonlinear systems. We hope that this package fills that need. We also have an implementation of the
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 02
3
Nonlinear equation
Dear R Users, I'm trying to find function that allow me to solve one nonlinear equation. Functions that I found are good for optimization problems. Any suggestions are welcome, rob
2007 May 10
2
Nonlinear constrains with optim
Dear All I am dealing at the moment with optimization problems with nonlinear constraints. Regenoud is quite apt to solve that kind of problems, but the precision of the optimal values for the parameters is sometimes far from what I need. Optim seems to be more precise, but it can only accept box-constrained optimization problems. I read in the list archives that optim can also be used with
2008 Mar 07
3
Numerical Integration in 1D
Dear UseRs, I'm curious about the derivative of n!. We know that Gamma(n+1)=n! So when on takes the derivative of Gamma(n+1) we get Int(ln(x)*exp(-x)*x^n,x=0..Inf). I've tried code like > integrand<-function(x) {log(x)*exp(x)*x^n} > integrate(integrand,lower=0,upper=Inf) It seems that R doesn't like to integrate for any n, and I was wondering if anyone knew a way around
2009 Jul 02
2
constrained optimisation in R.
i want to estimate parameters with maximum likelihood method with contraints (contant numbers). for example sum(Ai)=0 and sum(Bi)=0 i have done it without the constraints but i realised that i have to use the contraints. Without constraints(just a part-not complete): skellamreg_LL=function(parameters,z,design) { n=length(z); mu=parameters[1]; H=parameters[2]; Apar=parameters[3:10];
2008 Aug 27
5
Integrate a 1-variable function with 1 parameter (Jose L. Romero)
Hey fellas: I would like to integrate the following function: integrand <- function (x,t) { exp(-2*t)*(2*t)^x/(10*factorial(x)) } with respect to the t variable, from 0 to 10. The variable x here works as a parameter: I would like to integrate the said function for each value of x in 0,1,..,44. I have tried Vectorize to no avail. Thanks in advance, jose romero
2009 Jul 01
2
Difficulty in calculating MLE through NLM
Hi R-friends, Attached is the SAS XPORT file that I have imported into R using following code library(foreign) mydata<-read.xport("C:\\ctf.xpt") print(mydata) I am trying to maximize logL in order to find Maximum Likelihood Estimate (MLE) of 5 parameters (alpha1, beta1, alpha2, beta2, p) using NLM function in R as follows. # Defining Log likelihood - In the function it is noted as
2006 Nov 29
2
How to solve differential equations with a delay (time lag)?
Hi, I would like to solve a system of coupled ordinary differential equations, where there is a delay (time lag) term. I would like to use the "lsoda" function "odesolve" package. However, I am not sure how to specify the delay term using the syntax allowed by odesolve. Here is an example of the kind of problem that I am trying to solve: > library(odesolve)
2008 Feb 15
3
Error 'singular gradient' in nonlinear model fitting
w.age.female.2004 <- nls(WEIGHT ~ (alpha*TOTAL^beta)/454, start=list(alpha=1, beta=3), data=spottedseatrout2004.female.data) I am trying to fit above model to length-weight data of a fish species (spotted seatrout) by year (1999-2006). The convergence occurred for all the years except 2002 and 2004. In these two year, R shows the error called
2003 Apr 21
4
nonlinear equation solver?
Dear R-Help, I am trying to use R to solve a nonlinear equation many times for different values. I am looking for a mathematical nonlinear equation solution which may not have a closed solution form. For example, I have equation: 2 = (t^2)/log(t) What is t? I am wondering how to solve it in R. Many thanks, Zhu Wang Statistical Science Department SMU.
2008 Apr 09
3
LSODA not accurate when RK4 is; what's going on?
I'm solving the differential equation dy/dx = xy-1 with y(0) = sqrt(pi/2). This can be used in computing the tail of the normal distribution. (The actual solution is y(x) = exp(x^2/2) * Integral_x_inf {exp(-t^2/2) dt} = Integral_0_inf {exp (-xt - t^2/2) dt}. For large x, y ~ 1/x, starting around x~2.) I'm testing both lsoda and rk4 from the package odesolve. rk4 is accurate using step
2007 Feb 01
3
Need help writing a faster code
Hi, I apologize for this repeat posting, which I first posted yesterday. I would appreciate any hints on solving this problem: I have two matrices A (m x 2) and B (n x 2), where m and n are large integers (on the order of 10^4). I am looking for an efficient way to create another matrix, W (m x n), which can be defined as follows: for (i in 1:m){ for (j in 1:n) { W[i,j] <-
2008 Apr 09
4
Skipping specified rows in scan or read.table
Hi, I have a data file, certain lines of which are character fields. I would like to skip these rows, and read the data file as a numeric data frame. I know that I can skip lines at the beginning with read.table and scan, but is there a way to skip a specified sequence of lines (e.g., 1, 2, 10, 11, 19, 20, 28, 29, etc.) ? If I read the entire data file, and then delete the character
2009 Dec 11
2
Regularized gamma function/ incomplete gamma function
Dear all, I would be very grateful if you could help me with: Given the regularized gamma function Reg=int_0^r (x^(k-1)e^(-x))dx/int_0^Inf (x^(k-1)e^(-x))dx ; 0<r<Inf (which is eventually the ratio of the Incomplete gamma function by the gamma function), does anyone know of a package in R that would evaluate the derivative of the inverse of Reg with respect to k? I am aware that the
2008 Mar 12
3
Types of quadrature
Dear R-users I would like to integrate something like \int_k^\infty (1 - F(x)) dx, where F(.) is a cumulative distribution function. As mentioned in the "integrate" help-page: integrate(dnorm,0,20000) ## fails on many systems. This does not happen for an adaptive Simpson or Lobatto quadrature (cf. Matlab). Even though I am hardly familiar with numerical integration the implementation
2006 Sep 29
2
X-axis labels in histograms drawn by the "truehist" function
Hi, I have a simple problem that I would appreciate getting some tips. I am using the "truehist" function within an "apply" call to plot multiple histograms. I can't figure out how to get truehist to use the column names of the matrix as the labels for the x-axis of the histograms. Here is a simple example: X <- matrix(runif(4000),ncol=4) colnames(X)
2009 Sep 10
1
function to solve equations
Hi, I am trying to solve this equation prob = exp(-3.33 + 0.0102*x)/(1+exp(-3.33 + 0.0102*x)). I want to write a function where I call the function and enter the 'prob' value and the output should be the 'x'. Im not sure how to write this. I have a basic structure but im not sure if its correct. calc <- function(prob){ prob <- exp(-3.33+0.0102*x)/(1+exp(-3.33 + 0.0102*x))
2009 Apr 03
2
Geometric Brownian Motion Process with Jumps
Hi, I have been using maxLik to do some MLE of Geometric Brownian Motion Process and everything has been going fine, but know I have tried to do it with jumps. I have create a vector of jumps and then added this into my log-likelihood equation, know I am getting a message: NA in the initial gradient My codes is hear # n<-length(combinedlr) j<-c(1,2,3,4,5,6,7,8,9,10)