similar to: fit nonlinear model with groups

Displaying 20 results from an estimated 30000 matches similar to: "fit nonlinear model with groups"

2002 Apr 24
3
nonlinear least squares, multiresponse
I'm trying to fit a model to solve a biological problem. There are multiple independent variables, and also there are multiple responses. Each response is a function of all the independent variables, plus a set of parameters. All the responses depend on the same variables and parameters - just the form of the function changes to define each seperate response. Any ideas how I can fit
2012 Oct 15
2
fit a "threshold" function with nls
I am trying to model a dependent variable as a threshold function of my independent variable. What I mean is that I want to fit different intercepts to y following 2 breakpoints, but with fixed slopes. I am trying to do this with using ifelse statements in the nls function. Perhaps, this is not an appropriate approach. I have created a very simple example to illustrate what I am trying to do.
2008 Mar 08
1
ask for help on nonlinear fitting
I have a table like the following. I want to fit Cm to Vm like this: Cm ~ Cl+Q1*b1*38.67*exp(-b1*(Vm-Vp1)*0.03867)/(1+exp(-b1*(Vm-Vp1)*0.03867))^2+Q2*b2*38.67*exp(-b2*(Vm-Vp2)*0.03867)/(1+exp(-b2*(Vm-Vp2)*0.03867))^2 I use nls, with start=list(Q1=2e-3, b1=1, Vp1=-25, Q2=3e-3, b2=1, Vp2=200). But I always get 'singlular gradient' error like this. But in SigmaPlot I can get the result. How
2007 Feb 21
1
Confindence interval for Levenberg-Marquardt fit
Dear all, I would like to use the Levenberg-Marquardt algorithm for non-linear least-squares regression using function nls.lm. Can anybody help me to find a a way to compute confidence intervals on the fitted parameters as it is possible for nls (using confint.nls, which does not work for nls.lm)? Thank you for your help Michael
2013 Apr 05
2
Assessing the fit of a nonlinear model to a new dataset
Hi all, I am attempting to apply a nonlinear model developed using nls to a new dataset and assess the fit of that model. At the moment, I am using the fitted model from my fit dataset as the starting point for an nls fit for my test dataset (see below). I would like to be able to view the t-statistic and p-values for each of the iterations using the trace function, but have not yet worked out
2006 Sep 28
1
Nonlinear fitting - reparametrization help
Hi, I am trying to fit a function of the form: y = A0 + A1 * exp( -0.5* ( (X - Mu1) / Sigma1 )^2 ) - A2 * exp ( -0.5* ( (X-Mu2)/Sigma2 )^2 ) i.e. a mean term (A0) + a difference between two gaussians. The constraints are A1,A2 >0, Sigma1,Sigma2>0, and usually Sigma2>Sigma1. The plot looks like a "Mexican Hat". I had trouble (poor fits) fitting this function to toy data
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
2006 Mar 10
1
How to compare fit of linear and nonlinear models
Dear statistics experts, I'm looking for a way to compare the fit of the following three models: LinModel <- lm(y ~ x) LogModel <- nls(y ~ SSlogis(x, Asym, xmid, scal)) PotModel <- nls(y ~ a * x^n, start=list(a=1, n=1)) I am only interested in whether one of these models has substantial advances in explaining the variance of y. So my original idea was simply to compare the adjusted
2000 Jul 28
2
Using the nls package
I'm a bit confused about the nls package, I'm trying to use it for curve fitting. First off, the documentation for nls says ``see `nlsControl' for the names of the settable control values'' -- this is wrong, it should be nls.control (minor point but had me confused for a moment). Now I'll try something very simple (maybe too simple):
2000 Nov 10
3
NLS
Hello, I try to do a very simple nonlinear regression. The function is y = (b0 + b1*x1 + b2*x2 + b3*x3) * x4^b4 I think I do everything well, but as I set the starting value of b4 to 0 (it is the theoretically sane starting value), it converges very quickly, and to the wrong solution. Wrong in a sense, that 1) we do not expect this and 2) we do not get this on E-Views, Stata and SAS. I do not
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
2013 Mar 21
1
multiple peak fit
Hi I went through some extensive search to find suitable method (package, function) to fit multiple peaks. The best I found is ALS package but it requires rather complicated input structure probably resulting from GC-MS experimental data and seems to be an overkill to my problem. I have basically simple two column data frame with columns time and sig dput(temp) structure(list(time = c(33, 34,
2002 Dec 06
2
Fitting 2D vs. 2D data with nls()
Dear R-experts! I have y(x) data, dim(y) == dim(x) == c(2000, 2) I'd like to fit them with nls: fit.result <- nls ( y ~ f(x, p1, p2, p3), start = list(p1 = ... , p2 = .. , p3 = ..) ) Actually I want to fit y[,1] ~ x[,1] and y[,2] ~ x[,2] *simulaneously*, with the same parameters set {p1, p2, p3}. I tried to feed R tha above formula, R errors with:
2023 Aug 20
2
Issues when trying to fit a nonlinear regression model
Dear Bert, Thank you so much for your kind and valuable feedback. I tried finding the starting values using the approach you mentioned, then did the following to fit the nonlinear regression model: nlregmod2 <- nls(y ~ theta1 - theta2*exp(-theta3*x), start = list(theta1 = 0.37, theta2 = exp(-1.8), theta3 =
2023 Aug 20
1
Issues when trying to fit a nonlinear regression model
I got starting values as follows: Noting that the minimum data value is .38, I fit the linear model log(y - .37) ~ x to get intercept = -1.8 and slope = -.055. So I used .37, exp(-1.8) and -.055 as the starting values for theta0, theta1, and theta2 in the nonlinear model. This converged without problems. Cheers, Bert On Sun, Aug 20, 2023 at 10:15?AM Paul Bernal <paulbernal07 at
2009 Nov 29
1
Plotting observed vs. fitted values
Dear Wiza[R]ds, I am very grateful to Duncan Murdoch for his assistance with this problem. His help was invaluable. However, the problem has become a little more complicated for me. Now, in each plot, I need to plot the observed and fitted values of a supine and upright posture experiment. Here is what I have and how far I got. # tritiated (3H)-Norepinephrine(NE) disappearance from plasma #
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
2023 Aug 20
1
Issues when trying to fit a nonlinear regression model
Oh, sorry; I changed signs in the model, fitting theta0 + theta1*exp(theta2*x) So for theta0 - theta1*exp(-theta2*x) use theta1= -.exp(-1.8) and theta2 = +.055 as starting values. -- Bert On Sun, Aug 20, 2023 at 11:50?AM Paul Bernal <paulbernal07 at gmail.com> wrote: > Dear Bert, > > Thank you so much for your kind and valuable feedback. I tried finding the > starting
2011 Jun 12
2
NLS fit for exponential distribution
Hello there, I am trying to fit an exponential fit using Least squares to some data. #data x <- c(1 ,10, 20, 30, 40, 50, 60, 70, 80, 90, 100) y <- c(0.033823, 0.014779, 0.004698, 0.001584, -0.002017, -0.003436, -0.000006, -0.004626, -0.004626, -0.004626, -0.004626) sub <- data.frame(x,y) #If model is y = a*exp(-x) + b then fit <- nls(y ~ a*exp(-x) + b, data = sub, start
2009 Feb 10
2
plotting the result of a nonlinear regression
Hello, to plot the result of a singular non linear regression (using nls) I usually use the function plotfit, for example: r.PTG.V<-nls(PTG.P~ fz1(Portata, a,b), data=dati, start=list(a=10, b=10), nls.control(maxiter=200), algorithm='port', trace=TRUE, na.action=na.omit, lower=list(a=0, b=10), upper=list(a=100, b=100)) plotfit(r.PTG.V) I tried to use the function plotfit on the