We’re rewarding the question askers & reputations are being recalculated! Read more.

# Questions tagged [nls]

nls is an R routine to fit nonlinear regression models of the form $y = f(x B) + e$

79 questions
Filter by
Sorted by
Tagged with
7 views

### Shared parameters similar to stats::nls() using “[]” but for minpack.lm::nlsLM() or similar?

I am looking for a method similar to the very convenient "[]" notation in stats::nls(), for estimating certain parameters separately (while sharing others) for subgroups within my data, which works ...
38 views

### r - Understand goodness of a fitted curve [duplicate]

I had to find the equation of curve that represent my data. After trying different function, I got a models that seems fitting my data, at least by plotting them. But this is it. I have no idea how to ...
88 views

...
44 views

### Constraining parameters in NLS in R to be less than a value, or greater than a different value

The nls function in R comes with upper and lower arguments to specify the upper or lower ...
25 views

### Nonlinear fit in R only works with tightly restricting parameter bounds [duplicate]

I have a reproducible example here with an attempt to use nls to fit a nonlinear function: y = ax/(b+x) + c Even when I set the starting values to be a good, ...
209 views

### Singular gradient erros, NLS in R

I'm trying to fit nls(Mound~ a*kg.bag.collar^b + c, start = list(a = 83, b = -.5, c=100), data=test) using the dataset here. I've fit it without trouble without the ...
163 views

### NLS model comparisons by ANOVA

I am comparing NLS models from two groups, males and females. I compared the models by ANOVAs, but I am hesitating which is the correct model comparison to use: a) Subgroup Males vs Subgroup Females ...
42 views

### Trouble fitting my data with non-linear Regression model

I have a dataset that contains tree height and diameter measurements among the tree stem. I tried to fit my data with GNLS in R, but I'm getting this "step halving factor reduced below minimum in NLS ...
23 views

### Hypothesis testing for nlsList fitted coefficients

I am trying to test in R if the coefficient R10 (soil respiration at 10 °C) is significantly different between two plant types (Type1 and Type2). For this, I fitted a modified Lloyd-Taylor function ...
17 views

### Estimate the Beta Coefficients, and then find an algorithm

Referring to the photo, I need to report my beta coefficients as functions of observed Xi and Yi. I tried to reduce by taking the log of both sides but It seems I can't reduce this model because it is ...
201 views

### Initial conditions for nonlinear models using the nlsLM function

I have a data frame containing 70000 rows. For each row, I am trying to apply the nlsLM function (minpack.lm package) to find ...
29 views

### How to perform joint estimation of parameters from two NLS-regressions in R?

First of all, I am new to the board so excuse me if I am not writing this post in the most optimal way. That aside, I am trying to run some models on optimal entry timing for successive product/...
61 views

### comparison of more than one multivariate nls models in r

dear members, I am trying to identify which of the two multivariate nls models is more of a good fit. I came to know that you can use anova and f tests for univariate nls models to know ...
684 views

### How to know if a parameter is statistically significant in a “curve_fit” estimation? [closed]

I use curve_fit from scipy to estimate parameter values from a specific function. ...
52 views

### Reproducing non-linear sigmaplot regression with nls()

I'm trying to reproduce a non-linear regression with various similar datasets. The original regressions were performed by sigmaplot with a modified morrison equation and estimates for parameters E=2,K=...
997 views

### How to fit exponential y=A(1-exp(B*X)) function to a given data set? Especially how to determine the initial start parameters? [duplicate]

I have a data set in which $y$ is roughly related to $\log(x)$. Now I wish to fit the curve $$y=A(1-\exp(BX))$$ When I use R and the nls2 function, then I ...
203 views

### Why do different parameterizations give different results for nls?

Goal I'm trying to fit a four-parameter logistic (A+(B-A)/(1+exp((xmid-input)/scal))) in R, using nls and SSfpl, to fit two datasets that share the upper, lower, ...
613 views

### Standard errors for non-linear least squares in R

I have a question on standard errors for non-linear least squares in R. With the built-in function NLS and a hand-made function I get different SE and I don't understand why. I will try to expose ...
353 views

### Fitting a sinusoidal curve only with max-min values

I have a series of high-low tide values, approx. every 6h, and each one has the corresponding time. I would like to get (an estimation of) the values between each record. I was thinking I could create ...
1k views

### Simultaneously curve fitting for 2 models with shared parameters in R

Hi I am trying to curve fit 2 models (Van Genuchten & Mualem) with shared parameters in r. The models are: ...
176 views

### Difference between probit of log(x) and probit using inverse lognormal cdf of x

Topic: probit and logprobit regression. Context: I have to implement a model of size at maturity in a wild population and I must choose a binomial linear model to estimate the parameters based on ...
154 views

### Bootstrapping of nonlinear regression residuals: why does the model fitting fail?

I am trying to define a range of uncertainty associated with each estimate of the parameters of a nonlinear model: ...
302 views

### Fitting a non linear equation to a dataset

I am working on fitting an equation from a dataset. In my dataset I have two variables where I am interested at and I looking a function that gives me the value the free variables that I use in the ...
535 views

### How to calculate p-value for a parameter given confidence interval when null hypothesis != 0

Given the dataset: ...
967 views

### Why is my nonlinear least squares confidence band so wide?

I have the following dataset: ...
1k views

### nls() gradient error in fitting growth curve data

I am trying to model the following data on promotional budget and customer awareness. The idea is, at some point, increase in budget doesn't have any further impact on awareness; it saturates. ...
1k views

### nls() function in R not fitting well when calculating Kd

I'm trying to calculate Kd with the following R code but my model is clearly wrong (see image). How has nls() converged so poorly? How can I use it to find a better ...
267 views

12 views

### Using a model with domain/image constraints [duplicate]

I would like to fit a model and the smallest predicted value must be zero. This is what I have done: ...
1k views

### Fiting non-linear model to small data set

I want to do a small example with fitting non-linear model Here are data: x <- c(10, 15, 25) y <- c(5, 10, 15) Firstly I fit a second degree polynom: <...
748 views

### Non linear regression - Von Bertalanffy Growth Function - Error: “singular gradient matrix at initial parameter estimates”

I am trying to estimate VBGF parameters K and Linf using non linear regression and nls(). First I used a classic approach where I estimate both parameters together as below with "alkdyr" being a ...
9k views

### How to fit piecewise constant (or step-function) model and compare to logistic model in R

I have x, y data where x is position (along a transect) and y is a continuous variable (e.g. temperature). ...