similar to: R-beta: nonlinear fitting

Displaying 20 results from an estimated 11000 matches similar to: "R-beta: nonlinear fitting"

2005 Dec 04
1
Understanding nonlinear optimization and Rosenbrock's banana valley function?
GENERAL REFERENCE ON NONLINEAR OPTIMIZATION? What are your favorite references on nonlinear optimization? I like Bates and Watts (1988) Nonlinear Regression Analysis and Its Applications (Wiley), especially for its key insights regarding parameter effects vs. intrinsic curvature. Before I spent time and money on several of the refences cited on the help pages for "optim",
2010 Feb 02
1
how to use optim() or nlm() to solve three nonlinear equations
Dear all, I just know how to solve an eaquation by using optim() or nlm(). But, now, I have three nonlinear equations, how could we use optim() or nlm() to solve  a system of nonlinear equations in R?  Thank you so much. Sincerely, Joe ___________________________________________________ 您的生活即時通 - 溝通、娛樂、生活、工作一次搞定! [[alternative HTML version deleted]]
2007 Jul 17
1
fit a nonlinear model using nlm()
I am trying to fit a nonlinear model using nlm(). My application of nlm() is a bit complicated. Here is the story behind the model being fit: The observer is trying to detect a signal corrupted by noise. On each trial, the observer gets stim=signal+rnorm(). In the simulation below I have 500 trials. Each row of stim is a new trial. On each trial, if the cross-correlation between the stim and the
1998 Mar 11
1
R-beta: ms, nls, etc?
I tried to ?ms, ?nls and apparently these aren't implemented on R yet. However I seem to remember postings on this list having to do with fitting nonlinear models (no I don't mean GLM type fits, I have a REAL nonlinear model: y=ax^b + c). So please tell me if it is possible to fit nonlinear models in R (by least squares or ML). Thanks! Bill Simpson
2008 Jun 09
1
nonlinear fitting on many voxels
After many months, I am now banging my head against the wall because I can't find a solution to this seemingly trivial problem.  Any help would be appreciated: I am trying to apply a nonlinear fitting routine to a 3D MR image on a voxel-by-voxel basis.  I've tested the routine using simulated data and things went well.  As for the real data, the fitting routine
1998 Apr 14
1
R-beta: SEs for one-param MLE in R?
Simple-mindedly I tried getting MLE and SE for one-parameter model in the same way as for multi-param models. out<-nlm(fn,p=c(2),hessian=T) But sqrt(diag(solve(out$hessian))) gives the answer 1. The Hessian has only one entry, not really a matrix. diag(x) gives 1 if x is just a single number. Is this what I should be doing to get SE for MLE? sqrt(solve(out$hessian)) Thanks very much for
1998 Apr 14
1
R-beta: SEs for one-param MLE in R?
Simple-mindedly I tried getting MLE and SE for one-parameter model in the same way as for multi-param models. out<-nlm(fn,p=c(2),hessian=T) But sqrt(diag(solve(out$hessian))) gives the answer 1. The Hessian has only one entry, not really a matrix. diag(x) gives 1 if x is just a single number. Is this what I should be doing to get SE for MLE? sqrt(solve(out$hessian)) Thanks very much for
1998 Jul 03
1
R-beta: sum of squares and NAs
This surprised me. Is it the way it is supposed to be? > x<-c(1,2,3,4,5) > y<-c(1.2,1.3,1.4,1.5,NA) > x-y [1] -0.2 0.7 1.6 2.5 NA > (x-y)^2 [1] 0.04 0.49 2.56 6.25 NaN >>>so NA^2 = NaN? Why not still NA? > sum((x-y)^2) [1] NaN >>>yes that is reasonable So if you ever have a data set with missing observations (NAs), you can't do any nlm() least
2004 Feb 24
5
Nonlinear Optimization
Hi, I have been brought back to the "R-Side" from MatLab. I have used R in graduate econometrics but only for statistics and regression (linear and nonlinear). But now I need to run general nonlinear optimization. I know about the add-in quadprog but my problem is not QP. My problem is a general nonlinear (obj funct) with linear constraints.I know about the "ms" and
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
2004 Oct 12
2
constrained optimization using nlm/optim?
I'm looking for an example of a simple R script that impliments a contrained nonlinear function using nlm or optim. I'm not exactly sure how to impliment the constraints within the objective function that is passed to nlm/optim. obj.func <- function( p ) { x(p) <- unconstrained obj function value if( constraint1 > something ) { obj.func <- x(p) } else {
2011 Mar 11
2
Ifs in formula
Dear r-helpers, This might be an elementary question, but I have a hard time getting my head around it, so all help is much appreciated. I am working on a nonlinear regression model of the form if z > 0 y = f1(x,y), else y = f2(x,t) . In other words, the functional form of f(.) changes according to some criteria z. Natural approach would be to fit two models, i.e. model1 <- nlm(y ~ ...,
2007 Mar 27
0
Solving a system of nonlinear equations involving weighted parameters
Hi, I'm trying to solve the following system of nonlinear equations P1 - F2 = x[1] + (1/2) * x[3] * x[1]^2 P2 - F2 = x[2] + (1/2) * x [3] * x[2]^2 F1 - F2 = -(1/2) * x[1] - (1/2) * x[2] + (1/8) * x [3] * (x[1] + x[2])^2 B1 - F2 = (1/4) * x[1] - (1/4) * x[2] + (1/16) * x[3] * (x[1] - x[2])^2 B2 - F2 = (1/4) * x[1] + (1/4) * x[2] + (1/16) * x[3] * (x[1]
2005 Feb 22
3
problems with nonlinear fits using nls
Hello colleagues, I am attempting to determine the nonlinear least-squares estimates of the nonlinear model parameters using nls. I have come across a common problem that R users have reported when I attempt to fit a particular 3-parameter nonlinear function to my dataset: Error in nls(r ~ tlm(a, N.fix, k, theta), data = tlm.data, start = list(a = a.st, : step factor 0.000488281
2008 Aug 05
1
optimize simultaneously two binomials inequalities using nlm( ) or optim( )
Dear R users, I?m trying to optimize simultaneously two binomials inequalities (used in acceptance sampling) which are nonlinear solution, so there is no simple direct solution. Please, let me explain shortly the the problem and the question as following. The objective is to obtain the smallest value of 'n' (sample size) satisfying both inequalities: (1-alpha) <= pbinom(c, n, p1)
2001 Apr 27
3
nls question
I have a question about passing arguments to the function f that nlm minimizes. I have no problems if I do this: x<-seq(0,1,.1) y<-1.1*x + (1-1.1) + rnorm(length(x),0,.1) fn<-function(p) { yhat<-p*x+(1-p) sum((y-yhat)^2) } out<-nlm(fn,p=1.5,hessian=TRUE) But I would like to define fn<-function(x,y,p) { yhat<-p*x+(1-p) sum((y-yhat)^2) } so
2007 Oct 01
0
Clustering literature was Re: nonlinear regression
Hi It is preferable to echo your posts to r-help, you usually get more answers and some definitelly superb to mine. It is also better to start a new mail if your question has nothing to do with original subject "Maura E Monville" <maura.monville at gmail.com> napsal dne 01.10.2007 17:44:43: > Unluckily I do not have the privilege of practising with R all day > long. I
2006 Nov 10
1
Variable limit in nlm?
Admittedly I am using an old version 1.7.1, but can anyone tell if this is or was a problem. I can only get nlm (nonlinear minimization) to adjust the first three components of function variable. No gradient or hessian is supplied. E.G.; fnoise function(y) { y[5]/(y[4]*sp2) * exp(-((x[,3]-y[1]-y[2]*x[,1]-y[3] *x[,2])/y[4])^2/2) + (1-y[5])/(y[9]*sp2) * exp(-((x[,3]-y[6]-y[7]*x[,1]-y[8]
2004 Oct 11
1
nlm question
Dear R People: I am trying to duplicate the example from Dennis and Schnabel's "Numerical Methods for Unconstrained Optimization and Nonlinear Equations", which starts on page 149. My reason for doing so: to try to understand the "nlm" function. Here is the function: >mfun1 function(x) { z <- matrix(0,nrow=2,ncol=1) z[1,1] <- x[1]^2 + x[2]^2 -
2006 Jan 25
2
Question about fitting power
Hi R users I'm trying to fit a model y=ax^b. I know if I made ln(y)=ln(a)+bln(x) this is a linear regression. But I obtain differente results with nls() and lm() My commands are: nls(CV ~a*Est^b, data=limiares, start =list(a=100,b=0), trace = TRUE) for nonlinear regression and : lm(ln_CV~ln_Est, data=limiares) for linear regression Nonlinear