similar to: NLS estimation: Starting values

Displaying 20 results from an estimated 10000 matches similar to: "NLS estimation: Starting values"

2003 Aug 28
3
(no subject)
Dear All, A couple of questions about the nls package. 1. I'm trying to run a nonlinear least squares regression but the routine gives me the following error message: step factor 0.000488281 reduced below `minFactor' of 0.000976563 even though I previously wrote the following command: nls.control(minFactor = 1/4096), which should set the minFactor to a lower level than the default
2005 Dec 14
2
suggestions for nls error: false convergence
Hi, I'm trying to fit some data using a logistic function defined as y ~ a * (1+m*exp(-x/tau)) / (1+n*exp(-x/tau) My data is below: x <- 1:100 y <- c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,1,1,1,2,2,2,2,2,3,4,4,4,5, 5,5,5,6,6,6,6,6,8,8,9,9,10,13,14,16,19,21, 24,28,33,40,42,44,50,54,69,70,93,96,110,127,127,141,157,169,
2012 Mar 08
1
sas retain statement in R or fitting differene equations in NLS
I wish to fit a dynamical model in R and I am running in a problem that requires some of your wisdom to solve. For SAS users I am searching for the equivalent of the */retain/ *statement. For people that want to read complicated explanations to help me: I have a system of two equations written as difference equations here. To boil it down. I have a dataframe with three variables y, X1, X2
2001 Dec 14
1
nls fit to exponential decay with unknown time origin
I'm trying to use nls() to fit an exponential decay with an unknown offset in the time (independent variable). (Perhaps this is inherently very difficult?). > decay.pl <- nls (amp ~ expn(b0,b1,tau,t0,t), data = decay, + start = c(b0=1, b1=7.5, tau=3.5, t0=0.1), trace=T) Error in nlsModel(formula, mf, start) : singular gradient matrix at initial parameter estimates
2004 Nov 14
1
solving system of nonlinear equations
Hello there Can anybody please tell me if there is any package in R to solve the following 4 nonlinear equations with 4 unknowns: alpha*exp(20/sigma)+ beta*exp(21/tau) = 2 alpha*exp(22/sigma)+ beta*exp(9/tau) = 4 alpha*exp(10/sigma)+ beta*exp(30/tau) = 6 alpha*exp(40/sigma)+ beta*exp(39/tau) = 5 where alpha = exp(lambda/sigma) beta= exp(delta/tau) I need to estimate lambda, sigma, delta, tau
2008 Sep 06
1
Help use try function with boot
Hi R users, Is is possible for me to use the try function with boot? I would to do the bootstraping with a nonlinear model(it works well when R < 1000). But it does not work very well (when R is large) thus I try to use "try" to resolve. I put the try function in two cases: case1: put the try in front of the boot > c1.try<-try(boot(c1data, statistic = c1.fun,
2004 Jan 22
4
Fitting compartmental model with nls and lsoda?
Dear Colleagues, Our group is also working on implementing the use of R for pharmacokinetic compartmental analysis. Perhaps I have missed something, but > fit <- nls(noisy ~ lsoda(xstart, time, one.compartment.model, c(K1=0.5, k2=0.5)), + data=C1.lsoda, + start=list(K1=0.3, k2=0.7), + trace=T + ) Error in eval(as.name(varName), data) : Object
2005 Mar 04
0
Need suggestions for finding dose response using nls
I am relatively new to R and am looking for advice, ideas or both... I have a data set that consists of pathogen population sizes on individual plant units in an experimental field plot. However, in order to estimate the pathogen population sizes I had to destroy the plant unit and could not determine if that plant unit became diseased or to what extent it would have become diseased. I
2010 Nov 08
1
try (nls stops unexpectedly because of chol2inv error
Hi, I am running simulations that does multiple comparisons to control. For each simulation, I need to model 7 nls functions. I loop over 7 to do the nls using try if try fails, I break out of that loop, and go to next simulation. I get warnings on nls failures, but the simulation continues to run, except when the internal call (internal to nls) of the chol2inv fails.
2012 Mar 06
0
Fitting difference models in R (nls, nlme)
I wish to fit a dynamical model in R and I am running in a problem that requires some of your wisdom to solve. For SAS users I am searching for the equivalent of the retain statement. For people that want to read complicated explanations to help me: I have a system of two equations written as difference equations here. To boil it down. I have a dataframe with three variables y, X1, X2 which
2001 Dec 15
1
fit to spike with exponential decay : optim() question
I finally got (mostly) what I wanted. In an attempt to figure out how to get nls to deal with a non-differentiable function, I had (stupidly) 'simplified' the problem until it became singular. Can I do something to make optim() less sensitive to my initial guess? For this example, I get a lousy solution if I make the initial guess for t0 = min(t) = 0.05. Thanks again, -- Robert Merithew
2004 Feb 04
1
Fitting nonlinear (quantile) models to linear data.
Hello. I am trying to fit an asymptotic relationship (nonlinear) to some ecological data, and am having problems. I am interested in the upper bound on the data (i.e. if there is an upper limit to 'y' across a range of 'x'). As such, I am using the nonlinear quantile regression package (nlrq) to fit a michaelis mention type model. The errors I get (which are dependant on
2009 Dec 01
2
Starting estimates for nls Exponential Fit
Hello everyone, I have come across a bit of an odd problem: I am currently analysing data PCR reaction data of which part is behaving exponential. I would like to fit the exponential part to the following: y0 + alpha * E^t In which Y0 is the groundphase, alpha a fluorescence factor, E the efficiency of the reaction & t is time (in cycles) I can get this to work for most of my reactions,
2008 Sep 09
1
S.O.S "try" doesnot work in boot?
First thanks for Jinsong's suggestions I would like to do a bootstrap in a nonlinear model. But it fails to converge in most of time. (it did converge if I just use nls without boot). Thus, I use "try" function to resolve my problem. This following code is from Jinsong's suggestion. h1a.nls<-nls(density~nmf(time, alpha, delta, psi, tau, gamma),data=h1a,
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
2010 Apr 06
1
estimating the starting value within a ODE using nls and lsoda
All- I am interested in estimating a parameter that is the starting value for an ODE model. That is, in the typical combined fitting procedure using nls and lsoda (alternatively rk4), I first defined the ODE model: minmod <- function(t, y, parms) { G <- y[1] X <- y[2] with(as.list(parms),{ I_t <- approx(time, I.input, t)$y dG <- -1*(p1 + X)*G +p1*G_b dX <-
2008 Jan 01
2
Non-Linear Quantile Regression
Please, I have a problem with nonlinear quantile regression. My data shows a large variability and the quantile regression seemed perfect to relate two given variables. I got to run the linear quantile regression analysis and to build the graph in the R (with quantreg package). However, the up part of my data dispersion seems a positive exponential curve, while the down part seems a negative
2012 Dec 02
0
suggestions for nls error: false convergence
Hi, I'm trying to fit some data using a logistic function defined as y ~ a * (1+m*exp(-x/tau)) / (1+n*exp(-x/tau) My data is below: x <- 1:100 y <- c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,1,1,1,2,2,2,2,2,3,4,4,4,5, 5,5,5,6,6,6,6,6,8,8,9,9,10,13,14,16,19,21, 24,28,33,40,42,44,50,54,69,70,93,96,110,127,127,141,157,169,
2013 May 20
1
How to fit a normal inverse gaussian distribution to my data using optim
Dear R Help Please forgive my lack of knowledge,.I would be very thankful for some help. Here is my problem: I was using optim to estimate parameters of a model and I get this error message "Error in optim(x0, fn = riskll, method = "L-BFGS-B", lower = lbs, upper = ubs, : L-BFGS-B needs finite values of 'fn'" Below is the R code I have written.
2011 Nov 19
1
wald test: compare quantile regression estimators from different samples
Dear all, I am trying to compare the estimated coefficients of a quantile regression model between two different samples. It is a Wald test, but I cannot find one way to do that in R.The samples are collected conditional on a specific characteristic and I would like to test whether such characteristic indeed affect the estimators. The problem in the test anova.rq is that the response variable