# Questions tagged [nls]

nls is an R routine to fit nonlinear regression models of the form $y = f(x B) + e$. Use this tag for any on-topic question that (a) involves nls either as a critical part of the question or expected answer, & (b) is not just about how to use nls or R.

125 questions
Filter by
Sorted by
Tagged with
57 views

### What is a good starting model for fitting a rotated sigmoidal curve?

I'm trying to make a model to fit a rotated sigmoidal curve in R but don't know where to start when looking for an appropriate equation for the model. Some example data and the type of fit I'm getting ...
1 vote
76 views

### Non-linear regression with very noisy data with nls() in R

I am trying to fit noisy data to a specific model with two parameters which I would like to estimate. Unfortunately, the model fit is just terrible with added noise. Is there anything I can do to ...
• 11
55 views

### Build a logistic model that fits two curves in R

The relation between my dependent variable y and my independent variable x can be described by a logistic regression like: ...
• 95
30 views

### Statistical significance between sigmoidal regression curves

I have a data-set of weight ~ temperature that was measured in 3 species (A-B-C), each consisting of 2 genotypes (a-b) that were grown in 3 soils (1-2-3) each. Weight ~ temperature for each Soil x ...
• 95
65 views

### Error in nls model: singular gradient matrix at initial parameter estimates. Cannot figure out appropriate start values [closed]

I'm trying to implement equation 3 from this article research paper, for ease here's a screenshot of the equation: Here's my code for it ...
130 views

### Normalization of log-returns or normalization of cumulative log-returns

This questions seeks for discussion to find theoretical support for normalizing cumulative log-returns vs normalizing log-returns By "normalizing" (also known as standarizing) I mean it in ...
• 21
26 views

### Can I adjust lambda by 1 or 2 S.E. in exponential decay to potential improvements in retention

(Similar example data to a post I made posted yesterday but a completely different question) I have an exponential decay with off-set function that looks like this: ...
• 1,588
39 views

### Calculate non linear regression (nls()) prediction interval without a library

I wouldlike to know how to calculate a prediction interval manually, without using a library. Ultimate goal is to write some formula in a spreadsheet based on the model params that would let me ...
• 1,588
1 vote
102 views

### Singular gradient errors in nls in R studio [closed]

I make fisheries work, and I need to estimate some parameters from the von Bertalanffy equation: Lt=Linf*(1-exp-K(t-t0)) here Linf, K, and t0 are the parameters that I want to estimate by FSA package ...
1 vote
55 views

### How to weigh residuals based on x-interval in the nls() function in R?

A plot of my data and fit: ...
• 11
1 vote
106 views

### fitting growth curves with nls singular gradient error [duplicate]

I'm having trouble fitting my model to a bacteria growth curve. I made a sample of my data below. Code: ...
• 13
75 views

### Significance of the p-values of the parameters in a non-linear model (using R)

I applied a logistic regression using the nlmrt package to describe the relationship between biomass and the distance and site variables. I got this result, but I ...
26 views

• 11
19 views

### Sine curve fit using lm, nls and nls2 in R [closed]

I acquired data (motor adaptation =y in function of delays =t ) which I expect to look like a sine wave. I am trying (1) to fit a sine curve in my data and (2)to estimate the best model/parameters. I ...
• 11
1k views

### Comparing time series data between three treatment groups (in R)

I have time series data where the response is decreasing over time. The rate of the decrease is supposed to depend on the treatment (the concentration of a drug). By looking at the data I am not sure ...
1 vote
44 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 ...
• 31
3k views

...
• 31
908 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 ...
• 473