similar to: How to derive function for parameters in Self start model in nls

Displaying 20 results from an estimated 200 matches similar to: "How to derive function for parameters in Self start model in nls"

2001 May 01
0
SSfpl self-start sometimes fails... workaround proposed
Hello, nls library provides 6 self-starting models, among them: SSfp, a four parameters logistic function. Its self-starting procedure involves several steps. One of these steps is: pars <- as.vector(coef(nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))), data = xydata, start = list(lscal = 0), algorithm = "plinear"))) which assumes an initial value of lscal equal to 0. If lscal
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),
2010 Jul 19
1
nls with some coefficients fixed
I'm using nls to fit a variety of different models. Here I use SSgompertz as an example. I want the ability to fix one (or more) of the coefficients that would normally be optimised (e.g. fix b3=0.8). Examples; based on and using data from example(SSgompertz) #--------------------- # vanilla call to nls, no coefficients fixed, works fine nls(density ~ SSgompertz(log(conc), Asym, b2, b3),
2007 May 26
1
bug from nlm function (PR#9711)
Full_Name: bernardo moises lagos alvarez Version: 2.4.0 OS: Windows XP professional Submission from: (NULL) (152.74.219.16) I need obtained the MLE of weibull parameters using the nlm with exact gradient an hessian. I am doing. bug report :Erro en log(b) : el argumento "b" est? ausente, sin default 1.Construction to objectiv functin with n=1 data
2004 May 14
2
NLME model question
Dear R-helpers I have a problem related to the use of NLME I think is simply a matter of getting the nlme coding correct, but i cannot get my brain around it I am analysing some 24 growth curves of some cells , and i wanted to say that there are significant differences between the curves in two parameters that describe the pattern of growth. these parameters are from a logistic (r & k)
2001 May 28
0
bugs in deriv(*, *, function.arg = ) (PR#953)
Also, this should have gone in R-bugs quite a while ago : ------- start of forwarded message ------- From: Martin Maechler <maechler@stat.math.ethz.ch> To: R-core@stat.math.ethz.ch Subject: PROTECT() bugs in deriv(*, *, function.arg = ) Date: Mon, 16 Apr 2001 21:02:10 +0200 In R versions 0.50 and 0.64.2 , the following worked > deriv(expression(sin(cos(x) * y)),
2007 Mar 20
2
Problems about Derivaties
Dear participants to the list, this is my problem: I want to obtain an expression that represents the second derivative of one function. With "deriv3" (package "stats") it is possible to evaluate the second derivative, but I do not know how I can get the (analytical) expression of this derivative. For example: Suppose that I have a function of this form:
2007 Jan 12
1
incorrect result of deriv (PR#9449)
Full_Name: Joerg Polzehl Version: 2.3.1 OS: x86_64, linux-gnu Submission from: (NULL) (62.141.176.22) I observed an incorrect behavior of function deriv when evaluating arguments of dnorm deriv(~dnorm(z,0,s),"z") expression({ .value <- dnorm(z, 0, s) .grad <- array(0, c(length(.value), 1), list(NULL, c("z"))) .grad[, "z"] <- -(z * dnorm(z))
2005 Apr 23
1
start values for nls() that don't yield singular gradients?
I'm trying to fit a Gompertz sigmoid as follows: x <- c(15, 16, 17, 18, 19) # arbitrary example data here; y <- c(0.1, 1.8, 2.2, 2.6, 2.9) # actual data is similar gm <- nls(y ~ a+b*exp(-exp(-c*(x-d))), start=c(a=?, b=?, c=?, d=?)) I have been unable to properly set the starting value '?'s. All of my guesses yield either a "singular gradient" error if they
2012 Aug 14
0
error using boxcox.nls during non linear estimation
Hi all I?ve got a problem using boxcox.nls function in nlrwr packagge. I?m fitting several non linear models to these data: > x [1] 2 1 1 5 4 6 13 11 13 101 101 101 > y [1] 1.281055090 1.563609934 0.001570796 2.291579783 0.841891853 [6] 6.553951324 14.243274230 14.519899320 15.066473610 21.728809880 [11] 18.553054450 23.722637370 I used nls function with self
2001 May 28
1
deriv (PR#953)
------- start of forwarded message ------- From: Martin Maechler <maechler@stat.math.ethz.ch> To: R-core@stat.math.ethz.ch Subject: PROTECT() bugs in deriv(*, *, function.arg = ) Date: Mon, 16 Apr 2001 21:02:10 +0200 In R versions 0.50 and 0.64.2 , the following worked > deriv(expression(sin(cos(x) * y)), c("x","y"), function(x,y){}) function (x, y)
2012 Aug 14
1
bootstrapped CI for nonlinear models using nlsBoot from nlstools
Hi all I?m trying to get confidence intervals for parameters from nls modeling. I fitted a nls model to the following variables: > x [1] 2 1 1 5 4 6 13 11 13 101 101 101 > y [1] 1.281055090 1.563609934 0.001570796 2.291579783 0.841891853 [6] 6.553951324 14.243274230 14.519899320 15.066473610 21.728809880 [11] 18.553054450 23.722637370 The model fitted was:
2013 Jan 04
2
(no subject)
Hi, I am using the nls function and it stops because the number of iterations exceeded 50, but i used the nls.control argument to allow for 500 iterations. Do you have any idea why it's not working? fm1 <- nls(npe ~ SSgompertz(npo, Asym, b2, b3), data=f,control=nls.control(maxiter=500)) Error in nls(y ~ exp(-b2 * b3^x), data = xy, algorithm = "plinear", start = c(b2 =
2013 Jan 03
1
nls problem with iterations
Hi, I am using the nls function and it stops because the number of iterations exceeded 50, but i used the nls.control argument to allow for 500 iterations. Do you have any idea why it's not working? fm1 <- nls(npe ~ SSgompertz(npo, Asym, b2, b3), data=f,control=nls.control(maxiter=500)) Thanks for your help, Cheers, Karine.
2016 Dec 10
0
OT: a USB barcode scanner?
Hi, On Fri, Dec 09, 2016 at 04:02:50PM -0500, m.roth at 5-cent.us wrote: > I'm about to go googling, but thought I'd ask here if anyone's using a > barcode scanner with CentOS, and if so, a) what scanner are you using, > and b) what, if any, software are you using to record what it scans? Most USB barcode scanners can operate in so called keyboard wedge mode (either
2001 Oct 07
1
Bug in Deriv? (PR#1119)
deriv seems to have problems with a minus-sign before a bracket. Below are four examples of the same function, the top one is wrong, all others are correct (hopefully). Rest of expression not shown, it is the same for all versions. _ platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 3.0 year 2001 month 06 day 22 language R
2012 Aug 14
3
self-starter functions for y = a + b * c^x
Hi there are some predefined self-start functions, like SSmicmen, SSbiexp, SSasymp, SSasympOff, SSasympOrig, SSgompertz, SSflp, SSlogis, SSweibull, Quadratic, Qubic, SSexp (nlrwr) Btw, do you know graphic examples for this functions? The SSexpDecay (exponential decay) for y = (y0 - plateau)*exp(-k*x) + plateau from
2011 Jun 17
2
Non-linear Regression best-fit line
I am trying to fit a curve to a cumulative mortality curve (logistic) where y is the cumulative proportion of mortalities, and t is the time in hours (see below). Asym. at 0 and 1 > y [1] 0.00000000 0.04853859 0.08303777 0.15201970 0.40995074 0.46444992 0.62862069 0.95885057 1.00000000 [10] 1.00000000 1.00000000 > t [1] 0 13 20 24 37 42 48 61 72 86 90 I tried to find starting values for
2012 Feb 18
3
foreach %do% and %dopar%
Hi everyone, I'm working on a script trying to use foreach %dopar% but without success, so I manage to run the code with foreach %do% and looks like this: The code is part of a MCMC model for projects valuation, returning the most important results (VPN, TIR, EVA, etc.) of the simulation. foreach (simx = NsimT, .combine=cbind, .inorder=FALSE, .verbose=TRUE) %do% { MCPVMPA = MCVAMPA[simx]
2008 Aug 04
0
Unexpected nls behaviour: Solved
Hi Everyone, I'd omitted the non-optional 'parameters' argument to selfStart. Making this change to SSbatch gives the same (successful) result from the two calls to nls. SSbatch<-selfStart( model=function(Batch, Coeffs) { Coeffs[Batch] } ,initial=function(mCall, data, LHS) { # Estimate coefficients as mean of each batch xy <- sortedXyData(mCall[["Batch"]],