Displaying 20 results from an estimated 2000 matches similar to: "Problems with nls"
2012 Nov 28
1
Problems with nls
The problem is badly scaled -- parameters from very small to very big.
nlmrt package manages a bit better, but scaling would likely make it and
nls both happier. nlxb insists on having its data in a data frame.
Here's my code
rm(list=ls())
Laptop_sale <- c(1405,
1863,2027,2669,2938,5275,6595,6943,8621,10905,12420,22400,32380,31600,34900,43163,47838,47592)
CuSale <- Laptop_sale
time
2008 May 06
2
NLS plinear question
Hi All.
I've run into a problem with the plinear algorithm in nls that is confusing
me.
Assume the following reaction time data over 15 trials for a single unit.
Trials are coded from 0-14 so that the intercept represents reaction time in
the first trial.
trl RT
0 1132.0
1 630.5
2 1371.5
3 704.0
4 488.5
5 575.5
6 613.0
7 824.5
8 509.0
9
2005 Jun 21
2
nls(): Levenberg-Marquardt, Gauss-Newton, plinear - PI curve fitting
Hello,
i have a problem with the function nls().
This are my data in "k":
V1 V2
[1,] 0 0.367
[2,] 85 0.296
[3,] 122 0.260
[4,] 192 0.244
[5,] 275 0.175
[6,] 421 0.140
[7,] 603 0.093
[8,] 831 0.068
[9,] 1140 0.043
With the nls()-function i want to fit following formula whereas a,b, and c
are variables: y~1/(a*x^2+b*x+c)
With the standardalgorithm
2008 Oct 02
1
nls with plinear and function on RHS
Dear R gurus,
As part of finding initial values for a much more complicated fit I want to
fit a function of the form y ~ a + bx + cx^d to fairly "noisy" data and have
hit some problems.
To demonstrate the specific R-related problem, here is an idealised data
set, smaller and better fitting than reality:
# idealised data set
aDF <- data.frame( x= c(1.80, 9.27, 6.48, 2.61, 9.86,
2011 Aug 10
3
Need help on Newton-Raphson optimization
Hi,
Is there available package on the optimization function using
Newton-Raphson method (iterative quadratic approximation)? I have been using
the 'optim' function in R and found it really unstable (it depends heavily
on the initial values and functional forms). If I have to code it by myself,
can I get some advice on how to start (any good reference or sample code)? I
really
2008 Jul 08
2
nls and "plinear" algorithm
hello all
i havnt had a chance to read through the references provided for the
"nls" function (since the libraries are closed now).
can anyone shed some light on how the "plinear" algorithm works? also,
how are the fitted values obtained? also, WHAT DOES THE ".lin" below
REPRESENT?
thanking you in advance
######################################
i have a quick
2006 Jan 08
1
confint/nls
I have found some "issues" (bugs?) with nls confidence intervals ...
some with the relatively new "port" algorithm, others more general
(but possibly in the "well, don't do that" category). I have
corresponded some with Prof. Ripley about them, but I thought I
would just report how far I've gotten in case anyone else has
thoughts. (I'm finding the code
2011 Jan 02
3
changing method of estimation in GLM
can anyone tell me how can i control the method of estimation (i.e. scoring
method or Newton raphson method) in glm and compute deviance function ?
--
View this message in context: http://r.789695.n4.nabble.com/changing-method-of-estimation-in-GLM-tp3170836p3170836.html
Sent from the R help mailing list archive at Nabble.com.
2012 Aug 23
1
NLS bi exponential Fit
Hi everyone,
I'm trying to perform a bi exponential Fit with the package NLS. the
plinear algorithm seems to be a good choice
see:
p<-3000
q<-1000
a<--0.03
b<--0.02
t<-seq(0:144);t
y<-p*exp(a*t) + q*exp(b*t)+rnorm(t,sd=0.3*(p*
exp(a*t) + q*exp(b*t)))
fittA <- nls(y~cbind(exp(a*t), exp(b*t)),
algorithm="plinear",start=list(a=-.1, b=-0.2), data=list(y=y, t=t),
2004 Aug 26
1
gls: Newton-Raphson or EM?
Hello,
Does anyone know whether the gls function in the nlme library uses the Newton-Raphson or EM algorithm to find the restricted log-likelihood or maximum log-likelihood estimates?
Brendan Klick
bklick@jhsph.edu
[[alternative HTML version deleted]]
2004 Nov 19
2
glm with Newton Raphson
Hi,
Does anyone know if there is a function to find the maximum likelihood
estimates of glm using Newton Raphson metodology instead of using IWLS.
Thanks
Valeska Andreozzi
--------------------------------------------------------
Department of Epidemiology and Quantitative Methods
FIOCRUZ - National School of Public Health
Tel: (55) 21 2598 2872
Rio de Janeiro - Brazil
2010 Jun 22
1
Subject: Re ZINB by Newton Raphson??
I have not included the previous postings because they came out very strangely on my mail
reader. However, the question concerned the choice of minimizer for the zeroinfl()
function, which apparently allows any of the current 6 methods of optim() for this
purpose. The original poster wanted to use Newton-Raphson.
Newton-Raphson (or just Newton for simplicity) is commonly thought to be the
2007 Dec 24
1
curve fitting problem
I'm trying to fit a function y=k*l^(m*x) to some data points, with reasonable starting value estimates (I think). I keep getting "singular matrix 'a' in solve".
This is the code:
ox <- c(-600,-300,-200,1,100,200)
ir <- c(1,2.5,4,9,14,20)
model <- nls(ir ~ k*l^(m*ox),start=list(k=10,l=3,m=0.004),algorithm="plinear")
summary(model)
plot(ox,ir)
testox <-
2010 Apr 15
2
using nls for gamma distribution (a,b,d)
Dear all
i want to estimated the parameter of the gamma density(a,b,d)
f(x) = (1/gamma(b)*(a^b)) * ((x-d)^(b-1)) * exp{-(x-d)/a)} for x>d
f(x) = Age specific fertility rate
x = age
when i run this in R by usling nls()
gamma.asfr <- formula(asfr ~ (((age-d)^(b-1))/((gamma(b))*(a^b)))*
exp(-((age-d)/a)))
gamma.asfr1 <- nls(gamma.asfr, data= asfr.aus, start = list(b = 28, a = 1,
d= 0.5),
2003 Mar 26
1
nls
Hi,
df <- read.table("data.txt", header=T);
library(nls);
fm <- nls(y ~ a*(x+d)^(-b), df, start=list(a=max(df->y,na.rm=T)/2,b=1,d=0));
I was using the following routine which was giving Singular Gradient, Error in
numericDeriv(form[[3]], names(ind), env) :
Missing value or an Infinity produced when evaluating the model errors.
I also tried the
2007 Aug 20
3
Differentiation
Hi,
Could anyone tell me what is the command used in R to do
1. Differentiation
2. Newton Raphson method (Numerical Analysis in general...)
Are there any packages separately for this?
Thanks for your help!
BR, Shubha
[[alternative HTML version deleted]]
2012 Aug 31
3
fitting lognormal censored data
Hi ,
I am trying to get some estimator based on lognormal distribution when we have left,interval, and right censored data. Since, there is now avalible pakage in R can help me in this, I had to write my own code using Newton Raphson method which requires first and second derivative of log likelihood but my problem after runing the code is the estimators were too high. with this email ,I provide
2001 Oct 05
1
Bass response with Ogg Vorbis
I'm a bass player, I admit it. I came across a number of people
talking about bass response with Ogg Vorbis and it piqued my interest,
I live for this stuff.
I am using the Ogg files to distribute songs as converted right from
the 32 bit masters. This is a much different thing than ripping a 16
bit CD audio file that has been mushed and compressed much before it
winds up as an Ogg file. When
2005 Nov 16
2
Newton-Raphson
Dear all,
I want to solve a score function by using Newton-Raphson algorithm. Is there such a fucntion in R? I know there's one called optim, but it seems only doing minimizing or maximizing.
Thanks,
Jimmy
2012 Aug 29
2
Estimation parameters of lognormal censored data
Hi, I am trying to get the maximum likelihood estimator for lognormal distribution with censored data;when we have left, interval and right censord. I built my code in R, by writing the deriving of log likelihood function and using newton raphson method but my estimators were too high " overestimation", where the values exceed the 1000 in some runing of my code.
is there any one can