Displaying 20 results from an estimated 1200 matches similar to: "Curve Fitting"
2010 Jun 05
2
Greek letters and formatted text
Hi,
I desperately try to do s.th. like
m=1.23455
sig=0.84321
plot(1,1)
text(0.8,1,sprintf("<Sigma>=%1.2f?%1.2f",m,sig))
where actually the greek letter should appear for Sigma.
I have tried all sorts of combinations with expression and paste etc. but could not work it out. Maybe someone has an idea and can help me.
Thanks a lot+
Thomas
2010 Jun 05
1
text with greek letters
Hi,
I am having troubles in putting greek letters and formatted text in a plot
m=1.43432
sig=0.124333
text(10.5,0.07,sprintf("<Sigma>=%1.2f±%1.2f",m,sig))
I would like to have the greek letter Sigma followed by the formatted numeric values of m and sig.
Does someone know a solution?
thanks a lot
Thomas
---------------------------------
Thomas Bschorr
Department of Physics
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
2010 Sep 02
1
How using the weights argument in nls2?
Good morning gentlemen!
How using a weighted model in nls2? Values with the nls are logical since
values with nls2 are not. I believe that this discrepancy is due to I did
not include the weights argument in nls2.
Here's an example:
MOISTURE <- c(28.41640, 28.47340, 29.05821, 28.52201, 30.92055,
31.07901, 31.35840, 31.69617, 32.07168, 31.87296, 31.35525, 32.66118,
33.23385,
2013 Jan 02
1
Need help with self-defined function to perform nonlinear regression and get prediction interval
Dear All,
I was trying to call a self-defined function that performs nonlinear
regression and gets the corresponding prediction upper limit using nls2
package. However, weird thing happened. When I called the function in the
main program, an error message "fitted(nlsmodel): object 'nlsmodel' not
found" came up. But when I directly ran the codes inside the function, no
error came
2010 Nov 24
1
The nls2 function automatically prints the object!
Good morning gentlemen!
When I use the function nls2, and store it in an object, that object is
automatically printed, without the summary or to draw the object. For
example.
model <- nls2 (...)
Number of iterations to convergence: ...
Achieved convergence tolerance: ...
Nonlinear regression model
model: ... ~ ...
Date: NULL
The B k
... ... ...
residual sum-of-squares: ...
Number
2004 Jul 22
1
package nls2 for windows
Dear Madam or sir,
Does anyone know if there is a pre-compiled version of package nls2 for
windows, please?
Thank you.
Souleymane
2010 Mar 30
6
Error "singular gradient matrix at initial parameter estimates" in nls
I am using nls to fit a non linear function to some data.
The non linear function is:
y= 1- exp(-(k0+k1*p1+ .... + kn*pn))
I have chosen algorithm "port", with lower boundary is 0 for all of the
ki parameters, and I have tried many start values for the parameters ki
(including generating them at random).
If I fit the non linear function to the same data using an external
2010 May 11
1
nls() and nls2() behavior?
first, apologies for so many posts yesterday and today. I am
wrestling with nls() and nls2(). I have tried to whittle it down to a
simple example that still has my problem, yet can be cut-and-pasted
into R. here it is:
library(nls2)
options(digits=12);
y= c(0.4334,0.3200,0.5848,0.6214,0.3890,0.5233,0.4753,0.2104,0.3240,0.2827,0.3847,0.5571,0.5432,0.1326,0.3481)
x=
2008 May 09
2
Regarding anova result
Hi,
I fitted tree growth data with Chapman-Richards growth function using nls.
summary(fit.nls)
Formula:
Parameters:
Estimate Std. Error t value Pr
Signif. codes: 0 ''***'' 0.001 ''**'' 0.01 ''*'' 0.05 ''.'' 0.1 '' '' 1
Residual standard error: 1.879 on 713 degrees of freedom
Algorithm
2011 Mar 02
1
power regression: which package?
Dear R users and R friends,
I have a little problem... I don't know anymore which package to use if
I want to perform a power regression analysis.
To be clear, I want to fit a regression model like this:
fit <- ....(y ~ a * x ^ b + c)
where a, b and c are coefficients of the model.
The R Site does not have the answer I want...
Thanks in advance and with kind regards,
David
2011 Dec 11
1
nls start values
I'm using nls to fit periodic gene-expression data to sine waves. I need
to set the upper and lower boundaries, because I do not want any
negative phase and amplitude solutions. This means that I have to use
the "port" algorithm. The problem is, that depending on what start value
I choose for phase, the fit works for some cases, but not for others.
In the example below, the fit works
2008 May 23
3
nls diagnostics?
Hi, All:
What tools exist for diagnosing singular gradient problems with
'nls'? Consider the following toy example:
DF1 <- data.frame(y=1:9, one=rep(1,9))
nlsToyProblem <- nls(y~(a+2*b)*one, DF1, start=list(a=1, b=1),
control=nls.control(warnOnly=TRUE))
Error in nlsModel(formula, mf, start, wts) :
singular gradient matrix at initial
2005 Mar 08
4
Non-linear minimization
hello, I have got some trouble with R functions nlm(),
nls() or optim() : I would like to fit 3 parameters
which must stay in a precise interval. For exemple
with nlm() :
fn<-function(p) sum((dN-estdata(p[1],p[2],p[3]))^2)
out<-nlm(fn, p=c(4, 17, 5),
hessian=TRUE,print.level=2)
with estdata() a function which returns value to fit
with dN (observed data vactor)
My problem is that only
2009 Jun 11
1
Error in 1:p : NA/NaN argument when running model comparisons
Hi there,
I am trying to compare nonlinear least squares regression with AIC and anova. The simplest model is one nonlinear curve, and in the more complex model I have a categorical variable (producing parameter estimates for four curves).
Both models run fine, but when I try to produce an AIC value for the second model I get the error:
> AIC(pow.nls1)
[1] 114408.3
> AIC(pow.nls2)
Error in
2012 Nov 03
6
Parámetros iniciales para ajustes no lineales
Hola a todos
estoy aplicando la función polinómica de Hossfeld [1], y algunos otros modelos no lineales para tratar de ajustarlos a un grupo de datos forestales,
[1] Y= b*t*exp(c)/(t*exp(c)+a)
Al colocar la función en R con parámetros estimados, me devuelve los siguiente:
## model1 <- nls(ho ~ (b*edad*exp(c)/(edad*exp(c)+a)), data=nigra,
start=list(a=0.005,b=0.08,c=-0.00006),
2009 Aug 25
3
Covariates in NLS (Multiple nonlinear regression)
Dear R-users,
I am trying to create a model using the NLS function, such that:
Y = f(X) + q + e
Where f is a nonlinear (Weibull: a*(1-exp(-b*X^c)) function of X and q is a covariate (continous variable) and e is an error term. I know that you can create multiple nonlinear regressions where x is polynomial for example, but is it possible to do this kind of thing when x is a function with unknown
2009 Feb 10
3
summary of a list
Hello,
I'm using the following for loop to find regression curves using a list of functions (formList), a list of starting
values (startList), uppervalues (upperList) and lower values (lowerList).
A sample of the list of function I use in the loop is the following:
FormList <- list(PTG.P ~ fz1(Portata, a, b), PTG.P ~ fz2(Portata, a, b), PTG.P ~ fz3(Portata,a, b, d, e),
PTG.P ~
2008 Apr 10
1
(no subject)
Subject: nls, step factor 0.000488281 reduced below 'minFactor' of
0.000976563
Hi there,
I'm trying to conduct nls regression using roughly the below code:
nls1 <- nls(y ~ a*(1-exp(-b*x^c)), start=list(a=a1,b=b1,c=c1))
I checked my start values by plotting the relationship etc. but I kept
getting an error message saying maximum iterations exceeded. I have
tried changing these
2013 Nov 18
1
Ajuste curva
Hola,
quiero ajustar una curva sinoidal de la forma "f(x)=k/( 1+(c/log(x))^n)"
mediante la función 'nls' pero me da error el siguiente código:
>datos<-read.table(file="datos.csv", header=TRUE,sep=";",dec=",")
>library(nls)
>fit <- nls(y ~ k/(1+(c/log(x))^n), datos, start = list (k=100 , c
=5*10^(-6), n=1))
Error en