similar to: R nls results different from those of Excel ??

Displaying 20 results from an estimated 10000 matches similar to: "R nls results different from those of Excel ??"

2013 Feb 20
3
NLS results different from Excel -- Tricky fortunes nomination
Folks: I thought the following excerpt from Bruce McCullough's post would be a good candidate for the R fortunes package -- except that it's about Excel, not R! So I nominate it... but leave it to others to say whether it's really "qualified" to be nominated. ---- "The idea that the Excel solver "has a good reputation for being fast and accurate" does not
2013 Feb 20
1
NLS results different from Excel
The idea that the Excel solver "has a good reputation for being fast and accurate" does not withstand an examination of the Excel solver's ability to solve the StRD nls test problems. Solver's ability is abysmal. 13 of 27 "answers" have zero accurate digits, and three more have fewer than two accurate digits -- and this is after tuning the solver to get a good
2012 Jun 04
2
Non-linear curve fitting (nls): starting point and quality of fit
Hi all, Like a lot of people I noticed that I get different results when I use nls in R compared to the exponential fit in excel. A bit annoying because often the R^2 is higher in excel but when I'm reading the different topics on this forum I kind of understand that using R is better than excel? (I don't really understand how the difference occurs, but I understand that there is a
2009 Feb 03
3
non linear regression with nls
Hello, I'm a beginner with R and it's the first time I'm using the R-help list... I hope I'm in the right place, if not: Sorry!! I need to do non linear regressions on a data set which columns are: "river.name" "Portata" "PTG.P" "PO4.P" "NT.N" "NH4.N" "NO3.N" "BOD5" "SiO2"
2007 Sep 05
3
'singular gradient matrix’ when using nls() and how to make the program skip nls( ) and run on
Dear friends. I use nls() and encounter the following puzzling problem: I have a function f(a,b,c,x), I have a data vector of x and a vectory y of realized value of f. Case1 I tried to estimate c with (a=0.3, b=0.5) fixed: nls(y~f(a,b,c,x), control=list(maxiter = 100000, minFactor=0.5 ^2048),start=list(c=0.5)). The error message is: "number of iterations exceeded maximum of
2009 Jul 12
2
Nonlinear Least Squares nls() programming help
Hi, I am trying to use the nls() function to closely approximate a vector of values, colC and I'm running into trouble. I am not sure how if I am asking the program to do what I think its doing, because the same minimization in Excel's Solver does not run into problems. If anyone can tell me what is going wrong, and why I'm getting a singular convergence(7) error, please tell me. I
2008 Sep 03
2
nls convergence trouble
Hi, Parameters assessment in R with nls doesn't work, though it works fine with MS Excel with the internal solver :( I use nls in R to determine two parameters (a,b) from experimental data. m V C0 Ce Qe 1 0.0911 0.0021740 3987.581 27.11637 94.51206 2 0.0911 0.0021740 3987.581 27.41915 94.50484 3 0.0911 0.0021740 3987.581 27.89362
2011 Feb 25
2
nls
hi, I would like to find the x value (independent variable) for a certain dependent value using the fitted model with nls. with (predict) I can find y that corresponds to a list of x. I need the other way around. can it be done? thanks, afadda
2011 Feb 28
3
nls not solving
I am running the following nls equation. I tried it with data that excel was fitting and got the error: singular gradient matrix at initial parameter estimates I thought it was due to a low number of points (6), but when I create a dataset, I get the same problem. If I remove the parameter "a," then it can find a solution. Does anyone know what I can do to fit this model?
2007 Apr 15
1
nls.control( ) has no influence on nls( ) !
Dear Friends. I tried to use nls.control() to change the 'minFactor' in nls( ), but it does not seem to work. I used nls( ) function and encountered error message "step factor 0.000488281 reduced below 'minFactor' of 0.000976563". I then tried the following: 1) Put "nls.control(minFactor = 1/(4096*128))" inside the brackets of nls, but the same error message
2011 Mar 14
3
increase a value by each group?
Hi everybody. I'm looking for the way to increase the depth value in 0.01 for each index group. Easier to explain with this example: >my_data=read.table("clipboard", header=TRUE) Depth s_name index 3852 Site_1 144 3852 Site_1 144 3852 Site_1 144 3852 site_A 145 3852 site_A 145 3852 site_A 145 3852 site_A 145 3852 site_B 147 3852 site_B 147 3852 site_B 147 3852 site_B 147 54962
2012 Apr 02
2
nls() error
Hello, I am running a simple nls model (which a friend ran OK) but I get the following error: Error in nls(y ~ R * (1 - (x/K)^2), data = nls.dat, start = list(R = 0.3, : object 'R_nls_iter' not found Does anyone know what the 'R_nls_iter' error is? The data are: x=1:8 ; y=c(14,19,25,34,43,56,69,76) # starting values: R=.3, K=94 Thanks in advance. Jeff
2007 May 31
1
predict.nls - gives error but only on some nls objects
Dear list, I have encountered a problem with predict.nls (Windows XP, R.2.5.0), but I am not sure if it is a bug... On the nls man page, an example is: DNase1 <- subset(DNase, Run == 1) fm2DNase1 <- nls(density ~ 1/(1 + exp((xmid - log(conc))/scal)), data = DNase1, start = list(xmid = 0, scal = 1)) alg = "plinear", trace =
2008 Aug 29
1
nls() fails on a simple exponential fit, when lm() gets it right?
Dear R-help, Here's a simple example of nonlinear curve fitting where nls seems to get the answer wrong on a very simple exponential fit (my R version 2.7.2). Look at this code below for a very basic curve fit using nls to fit to (a) a logarithmic and (b) an exponential curve. I did the fits using self-start functions and I compared the results with a more simple fit using a straight lm()
2003 Nov 24
2
How to get the parameters of nls(...) for later use
Hi all, I need to use the parameter estimates of nls() for further analysis. I know how to do in S+, e.g. nls(...)$parameters. In R, the attributes(nls(...)) does not have parameters, how would one get the parameter values out of nls()? Thanks in advance. Nancy
2012 Jul 30
2
distance matrix and hclustering
Dear R Users,i am very new to R. I want your help on an issue regarding distance matrix and cluster analysis i had discharge data of 4 rivers(a,b,c,d) in 4 vectors each having 364 values > dput(qmu)structure(list(a = c(0.26, 0.25, 0.25, 0.25, 0.24, 0.23, 0.22, 0.21, 0.21, 0.21, 0.2, 0.19, 0.19, 0.19, 0.19, 0.18, 0.18, 0.18, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17,
2009 Apr 15
2
nls factor
I want to fit the model y=a*x^b using nls; where "a" should be different for each level of a factor. What is the easiest way to fit it? Can i do it with nls? I've looked the help pages and the MASS example in page 249 but the formula is different and I don't know how to specify it for my model. Thanks, Manuel [[alternative HTML version deleted]]
2006 Feb 07
1
sampling and nls formula
Hello, I am trying to bootstrap a function that extracts the log-likelihood value and the nls coefficients from an nls object. I want to sample my dataset (pdd) with replacement and for each sampled dataset, I want to run nls and output the nls coefficients and the log-likelihood value. Code: x<-c(1,2,3,4,5,6,7,8,9,10) y<-c(10,11,12,15,19,23,26,28,28,30) pdd<-data.frame(x,y)
2009 Feb 12
1
Using nls or nls.lm with a simulation output
We would like to fit parameters using a simulation with stochastic processes as theoretical values. We generate a simple exemple with nls.lm to see the logic and the problem: First without stochasticity (it is a dummy example, the fited value is simple the mean of a set of 10 numbers): #Ten numbers x <- 1:10 #Generate 10 Gaussian random number with mean=3 sd=1 simy <- rnorm(length(x),
2002 Nov 15
2
bug in logLik.nls (PR#2295)
logLik.nls does not count the df's correct. I get df=1 although I fit a probit-model with 3 parameters. Example: x <- c(-2.3, -2.0, -1.3, -1.0, -0.7, -0.3, 0.0, 0.3) y <- c(80, 80, 54, 43, 24, 18, 12, 12) fit.nls <- nls(y ~ diff * pnorm(beta * (x - alpha)), start=c(alpha=-1, beta=-1, diff=100)) logLik.nls(fit.nls) # `log Lik.' -21.43369 (df=1) Sincerely