nls is an R routine to fit linear regression models of the form y = f(xB) + e

learn more… | top users | synonyms

0
votes
0answers
33 views

Hill model: How to calculate confidence and prediction bands with R?

I have calculated a Hill model with two parameters (X50, Hill coefficient h) according to the following example: ...
2
votes
1answer
39 views

how to fit a michaelis-menten function with a random effect using the nlme package in R?

I am working on fitting a model using the nlme package in R. y is a saturating function of x, similar in form to a ...
2
votes
0answers
60 views

Calculating standard error of a coefficient that is calculated from other estimated coefficient

I'm working on the Gompertz growth model to fit weight at age: $$ m(a)=m_{\infty}e^{-\gamma exp(-g{1}a)}$$ Where $m_{\infty}$ and $g_{1}$ are coefficients to be estimated. To deal with lack of ...
1
vote
1answer
102 views

Fitting NLS algorithm

I have the list of time series. I am fitting these series with the formula $$y=ax^2\exp(b*x)$$. It should be noted that parameter $b$ in the formula must be negative as this reflects the behaviour of ...
0
votes
2answers
281 views

Using nls() function in R for exponential function

I know that this issue was already discussed here but I faced with the problem I can't solve. I have list of persons, each represented with some time series consisting from 4-8 points. I want to ...
4
votes
1answer
146 views

Is AIC appropriate for model selection when the parameters are fitted by least-squares rather than MLE

I want to compare the fit of a linear model (M1) and nonlinear model (M2): M1: $y = b_0 + b_1x_1 + b_2x_2 + b_3x_1x_2 + \epsilon, \epsilon \sim N(0, \sigma^2)$ M2: $y = b_0 + b_1x_1 + b_2x_2 + b_1 ...
2
votes
0answers
654 views

Fitting a “sigmoid” function: Why is my fit so bad?

I tried to fit a curve to the black points using the following code. Why is the fit so bad? Do I need to fit another type of function? ...
1
vote
0answers
62 views

How to calculate Pareto parameters

I'm trying to calculate the parameters for a Pareto distributed variable in R. I use the following model: form = rank~bet*(downloads)^(-alp)+eps, which is widely ...
4
votes
0answers
81 views

Numerical properties of the logistic growth model for non-linear regression

I am using the nls procedure in R to fit a logistic growth model. In their SSlogis function, José Pinheiro and Douglas Bates chose the formulation ...
2
votes
1answer
43 views

How do I incorporate 2 peaks in a liquidity model using curve-fitting and nls

This is my first time at stack exchange, hence please pardon me if I miss something. I have multiple questions and I am tearing myself as curve-fitting and estimation is foreign land to me, I am ready ...
2
votes
0answers
403 views

Non-linear modelling with several variables including a categorical variable

I am trying to model some data regarding a predator prey interaction experiment (n=26). Predation rate is my response variable and I have 4 explanatory variables: predator density (1,2,3,4 5), ...
3
votes
1answer
553 views

How to calculate confidence intervals for power function ($y=ax^b$) in R using NLS

I hope you can help me get some confidence in my confidence interval... I am trying to get the confidence interval for a particular (threshold) point on a predicted curve. I find the confidence ...
2
votes
1answer
509 views

nls curve fitting of nested/shared parameters

I'm trying to fit raw data to curves, which works well on an individual basis. However, I'd like to "share" parameters (sometimes referred as nested parameters) across more than one data series. Is ...
3
votes
0answers
324 views

Bayesian model averaging in R

I have a logistic model that I've built with the nls function in R. I want to use Bayesian model averaging for variable selection, but I can't find a package for ...
8
votes
1answer
804 views

Choose best model between logit, probit and nls

I'm analyzing a certain dataset, and I need to understand how to choose the best model that fits my data. I'm using R. An example of data I have is the following: ...
10
votes
1answer
1k views

How to minimize residual sum of squares of an exponential fit?

I have the following data and would like to fit a negative exponential growth model to it: ...
6
votes
1answer
1k views

How to test the effect of a grouping variable with a non-linear model?

I have a question regarding the use of a grouping variable in a non-linear model. Since the nls() function does not allow for factor variables, I have been struggling to figure out if one can test the ...
3
votes
1answer
1k views

How to get p value and confidence intervals for nls functions?

I have 2 questions. 1) How can I have p.value for my 2 functions? My hypothesis is that I have a correlation between my function and my data. 2) How can I have a confidence intervals for my 2 ...
4
votes
2answers
4k views

Singular gradient error in nls with correct starting values

I'm trying to fit a line+exponential curve to some data. As a start, I tried to do this on some artificial data. The function is: $$y=a+b\cdot r^{(x-m)}+c\cdot x$$ It is effectively an exponential ...
4
votes
1answer
553 views

Fitting conditional functions in nls

I'm trying to fit two equations with nls() function in R. The two functions are: $f(x) = c_{1} \exp\left(-\left(\frac{x-\mu}{\sigma_{(x)}}\right)^2\right)$ where $\sigma_{(x)} = \sigma_{11}$ if ...
11
votes
1answer
1k views

Change point analysis using R's nls()

I'm trying to implement a "change point" analysis, or a multiphase regression using nls() in R. Here's some fake data I've made. The formula I want to use to fit ...