Questions tagged [nls]

nls refers to nonlinear least-squares and is a function in R that allows to estimate the parameters of a nonlinear model.

nls should not be confused with nls-lang which is an environment variable for Oracle databases.

670 questions
0
votes
3 answers

How do I avoid unwanted log messages on java project?

On my java project, I have a bunch of strings externalized on a messages.properties file. On its respective Messages.java file I had the same number of public static String-typed attributes, so I could access those externalized texts. Then, I…
Mario Marinato
  • 4,561
  • 3
  • 29
  • 49
0
votes
1 answer

How to call $translateChangeSuccess function inside $translateReady?

Sometimes while loading the page, translateChangeSuccess is not getting fired and its throwing error. So, I need to call the $translateChangeSuccess whenever the $translate is ready. How to do it in a proper way? This is not working.It is not…
user6747084
0
votes
0 answers

R + dplyr nest + purrr - Evaluating a model across nestings within a dataframe row

This will be difficult to come up with a reproducible example for as there is no open source data as yet, and I'm not sure I'm allowed to share the data I have. I will try my best to explain it, and if this doesn't work, I can maybe take some time…
Granville
  • 80
  • 8
0
votes
0 answers

problems using nls on a grouped data

I am trying to fit a non linear model to a data-set that has two different treatment groups. values <- runif(20,1000,10000) timefornls <- rep(c(0:9), 2) treatment <- rep(c("group1", "group2"), each=10, len=20) datafornls <-…
VitalSigns
  • 83
  • 2
  • 10
0
votes
1 answer

R nls Different Errors occur

I'm new in R programming and I don't get a solution to an error which occurs when I use the nls Function. I try to fit the data from an ecdf (values are extracted and saved in y) to this function model with four parameters: fitsim <- nls(y ~…
Hark
  • 115
  • 1
  • 11
0
votes
1 answer

NLS API gives wrong long date for "en-ca"

The long date for culture "en-ca" is MMMM-dd-yy . This is correct and I have verified this with documentation. You can verify the result in .NET by doing the following. Dim culture As CultureInfo = CultureInfo.GetCultureInfo("en-ca") …
Some Guy
  • 45
  • 3
0
votes
1 answer

How can fit curve on this log data?

I have a problem with a fit curve on this data: On x axes we have a data about wind intensity (m/s), on y axes we have log data (fish catch). I fitted a curve (nls model, Gaussian curve) only on data without logaritm, but when i tried on log data,…
skylobo
  • 151
  • 1
  • 9
0
votes
1 answer

nls() R-function works fine in R Studio but not in SQL Server 2016

I am new to SQL Server with R Services and I am trying to implement a nls() function inside a Stored Procedure in order to find the best fitting curve that describes the data that the SP returns. The following nls() function with the specific…
gkoul
  • 1,067
  • 1
  • 10
  • 19
0
votes
0 answers

Non-Linear Modeling with nls in R

I want to use non-linear regression lines to show the Height over Diameter relation of trees. I'm using the following formula: h = A + B ∙ d + C ∙ d² For this I used the nls package in R. I inserted the Formula in the follwing…
Lukas
  • 223
  • 3
  • 12
0
votes
0 answers

nls: how to set unreachable bounds on parameters

I am trying to estimate a complex model with nlsLM() in R package minpack.lm. It goes like this: nlc <- nls.lm.control(maxiter = 10000, maxfev = 10000) nlsLM(formula = log(demand+0.001) ~ Diff.model.log(m,pin,q,lambda1,lambda2,goal,length,time), …
0
votes
2 answers

R code: "Error in parse unexpected end of input" when using non-linear solver

I am using the non-linear solver (nls) in R, but cannot run my model due to a parser error that I have no idea how to debug. Could someone please offer some advice on how to fix this? Code: Bass.nls <- nls( Zt[which(!is.na(Zt))] ~ M * ( ((P+Q)^2 /…
Haris
  • 27
  • 1
  • 1
  • 4
0
votes
0 answers

R trouble: nls parameter estimation

I am trying to estimate the values of 4 parameters with the nls() function using a few variables from a large dataframe. However, when I run my script, I get this error: Error in formula.default(object, env = baseenv()) : invalid formula The formula…
S K
  • 3
  • 3
0
votes
1 answer

Predict function in R

I am trying to use to predict function to predict 100 points new points. I have a data.frame with one vector that is 100 doubls long. I am trying the predict function: predict(model, newdata=mydat) The function only returns a vector of length…
Nicholas Hayden
  • 473
  • 1
  • 3
  • 24
0
votes
0 answers

fitting two functions with common parameters to two different data-sets simultaneously using nls()

I have two functions funk1 <- (t,a,b,c) { a* exp(-k*t)* b* exp(-c*t) } funk2 <- (t,a,b,c) { (A*t^k +a)* b* exp(-c*t) } where, k and A are known. I am trying to estimate parameters a,b,c by fitting these two functions funk1 & funk2 simultaneously…
VitalSigns
  • 83
  • 2
  • 10
0
votes
1 answer

Fiting 1 - exp(x) giving higher weight to the first values

I want to fit to a 1 - exp(x) function to a data set , but giving higher weight to the first values. However, the following code is not working in such way: x <-sqrt((0.05)^2+(0.05)^2)*seq(from = 1, to = 20, by = 1) y <-…
mountainlake
  • 39
  • 1
  • 4