similar to: nls(() and trace

Displaying 20 results from an estimated 2000 matches similar to: "nls(() and trace"

2006 Jun 29
1
inconsistent matplot behaviour?
I raised this question quite some time ago but it quitly went down the river. I'll give it a second try (before keeping my modified version of matplot for ever...): matplot supports vectors (and/or character strings) for a number of arguments namely `type', `lty', `lwd', `pch', `col', `cex'. all of them act consistently in such a way that the first entries are used
2004 Jun 10
2
nls and R scoping rules
I apologize for posting this in essence the second time (no light at the end of the tunnel yet..): is there a way to enforce that "nls" takes both, the data *and* the model definition from the parent environment? the following fragment shows the problem. #======== cut here========== wrapper <- function (choose=0) { x <- seq(0,2*pi,len=100) y <- sin(1.5*x); y <-
2009 Dec 18
2
NLS-Weibull-ERROR
Hello I was trying to estimate the weibull model using nls after putting OLS values as the initial inputs to NLS. I tried multiple times but still i m getting the same error of Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates. The Program is as below > vel <- c(1,2,3,4,5,6,7,8,9,10,11,12,13,14) > df <- data.frame(conc, vel) >
2006 Sep 15
1
Formula aruguments with NLS and model.frame()
I could use some help understanding how nls parses the formula argument to a model.frame and estimates the model. I am trying to utilize the functionality of the nls formula argument to modify garchFit() to handle other variables in the mean equation besides just an arma(u,v) specification. My nonlinear model is y<-nls(t~a*sin(w*2*pi/365*id+p)+b*id+int,data=t1,
2011 Jun 30
1
Error "singular gradient matrix at initial parameter estimates" in nls
Greetings, I am struggling a bit with a non-linear regression. The problem is described below with the known values r and D inidcated. I tried to alter the start values but get always following error message: Error in nlsModel(formula, mf, start, wts): singular gradient matrix at initial parameter estimates Calls: nls -> switch -> nlsModel I might be missing something with regard to the
2006 Mar 08
3
bug in map('world') ?
hi, did'nt see anything in the archive: map('world',pro='rectangular',para=0) yields a strange artifact (horizontal bar) extending over the whole map at a certain latitude range (approx 65 deg. north), whereas map('world',pro='rectangular',para=180) (which should be the same) does not show the artifact. the artifact shows up in other projections as well,
2004 Aug 13
2
bus error /segmentation fault from 'approx' (PR#7166)
Full_Name: joerg van den hoff Version: 1.9.0 and 1.7.1 OS: MacOS (1.9.0), SunOS (1.7.1) Submission from: (NULL) (149.220.4.88) something like (sure not the originally intended input, but something like this can happen...): approx(c(1,2),c(NA,NA),1.5) crashes R (bus error under MacOS, segmentation fault under SunOS). search of the bug archive did not work. I hope this bug was not reported
2007 Feb 13
1
nls: "missing value or an infinity" (Error in numericDeriv) and "singular gradient matrix"Error in nlsModel
Hi, I am a non-expert user of R. I am essaying the fit of two different functions to my data, but I receive two different error messages. I suppose I have two different problems here... But, of which nature? In the first instance I did try with some different starting values for the parameters, but without success. If anyone could suggest a sensible way to proceed to solve these I would be
2011 Nov 30
2
nls help
Hello, I have data like the following: datum <- structure(list(Y = c(415.5, 3847.83333325, 1942.833333325, 1215.22222233333, 950.142857325, 2399.5833335, 804.75, 579.5, 841.708333325, 494.053571425 ), X = c(1.081818182, 0.492727273, 0.756363636, 0.896363636, 1.518181818, 0.499166667, 1.354545455, 1.61, 1.706363636, 1.063636364 )), .Names = c("Y", "X"), row.names = c(NA,
2013 Mar 14
2
question about nls
Hi,all: I met a problem of nls. My data: x y 60 0.8 80 6.5 100 20.5 120 45.9 I want to fit exp curve of data. My code: > nls(y ~ exp(a + b*x)+d,start=list(a=0,b=0,d=1)) Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates I can't find out the reason for the error. Any suggesions are welcome. Many thanks. [[alternative HTML
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
2005 Jul 20
1
nls
Dear R-helpers, I am trying to estimate a model that I am proposing, which consists of putting an extra hidden layer in the Markov switching models. In the simplest case the S(t) - Markov states - and w(t) - the extra hidden variables - are independent, and w(t) is constant. Formally the model looks like this: y(t)=c(1,y[t-1])%*%beta0*w+c(1,y[t-1])%*%beta1*(1-w). So I ran some simulations to
2004 Oct 07
1
confidence interval for nls
Do I have the right impression that it's currently not possible to produce confidence intervals for the nls predictions using R? I had a course were we used SAS PROC nlin and there you could get intervals for the parameters and the prediction but I do not have access to SAS. Would it be difficult to implement, I tried to dig into the help pages of nls, vcov and nlsModel but I could not
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 Aug 13
2
Unable to retrieve residual sum of squares from nls output
Colleagues, I am using "nls" successfully (2.11.1, OS X) but I am having difficulties retrieving part of the output - residual sum of squares. I have assigned the output to FIT: > > FIT > Nonlinear regression model > model: NEWY ~ PMESOR + PAMPLITUDE * cos(2 * pi * (NEWX - POFFSET)/PERIOD) > data: parent.frame() > PMESOR PAMPLITUDE POFFSET >
2010 Apr 28
1
NLS "Singular Gradient" Error
Hello, I am trying to model a type II functional response of number of prey eaten (Ne) against number supplied (No) with a non-linear least squares regression (nls). I am using a modification of Holling's (1959) disc equation to account for non-replacement of prey; Ne=No{1-exp[a(bNe-T)]} where a is the attack rate, b is the handling time, and T is the experimental period. My script is as
2006 Dec 14
3
sapply problem
I have encountered the following problem: I need to extract from a list of lists equally named compenents who happen to be 'one row' data frames. a trivial example would be: a <- list(list( df = data.frame(A = 1, B = 2, C = 3)), list(df = data.frame(A = 4,B = 5,C = 6))) I want the extracted compenents to fill up a matrix or data frame row by row. the obvious thing to do seems: b
2003 Dec 15
1
nls arguments
Hi all, I've got a problem with the nls function. I have an adjustment which works when I fix one of the argument of my function (Xo=150) : *Xo*=150 f<- function (tt*,Xo*,a,b) ifelse(tt<*Xo*,a*exp(-b**Xo*),a*exp(-b*tt)) ajust<-nls(RER~f(tt,*Xo*,a,b),data=data.frame(tt=Ph2[,2*k],RER=Ph2[,2*k+1]),start=list(a=0.5,b=0.014)) But, when I use it as a "normal" parameter (and
2011 May 01
1
Urgent: conditional formula for nls
I have data vectors x and y both with 179 observations. I'm trying to fit a nonlinear model with five parameters using nls. The formula is only defined within a range of x-values, it should be zero otherwise, thus my attempted use of ifelse: > df<-data.frame(x,y) >
2001 Dec 14
1
nls fit to exponential decay with unknown time origin
I'm trying to use nls() to fit an exponential decay with an unknown offset in the time (independent variable). (Perhaps this is inherently very difficult?). > decay.pl <- nls (amp ~ expn(b0,b1,tau,t0,t), data = decay, + start = c(b0=1, b1=7.5, tau=3.5, t0=0.1), trace=T) Error in nlsModel(formula, mf, start) : singular gradient matrix at initial parameter estimates