search for: sslogi

Displaying 20 results from an estimated 94 matches for "sslogi".

Did you mean: sslogis
2008 Jan 04
3
nls (with SSlogis model and upper limit) never returns (PR#10544)
...ollowing computation never finishes and locks R up: > values <- list(x=10:30, y=c(23.85, 28.805, 28.195, 26.23, 25.005, 20.475, 17.33, 14.97, 11.765, 8.857, 5.3725, 5.16, 4.2105, 2.929, 2.174, 1.25, 1.0255, 0.612, 0.556, 0.4025, 0.173)) > y.max <- max(values$y) > model <- nls(y ~ SSlogis(x, asym, xmid, scal), data=values, algorithm="port", start=c(asym=y.max, xmid=15, scal=-0.5), upper=c(y.max, Inf, Inf)) This used to work with R version 2.5.1 patched. The problem does _not_ occur if the parameter "scal=-0.5" in the nls call is changed, e. g. to "scal=-0....
2005 Jun 27
0
SSlogis problem with min(y)==0
Hi, I think this is a problem solved but I would be interested to know if there is some good reason why SSlogis() behaves like this (apologies if this has been noticed before- I'm not confident my archive searches were effective): I have been fitting large numbers of regressions using nls with a self-starting 3 parameter logistic model (SSlogis()). I got a series of unexpected errors of the sort: mode...
2012 Jun 13
0
logistic Regression with SSlogis but y == 0 ?!
Hello there! I got some data with x and y values. there are some y == 0. This is a problem for the selfstarting regression model SSlogis. The regression works if I use a non selfstarting model. The formula is the same. But this needs very detailed information of the starting list. I dont have this Information all the time. An easy solution for selfstart model could be to add 1E-100 to the y==0 values. That works fine, but the Reg...
2011 Aug 09
1
nls, how to determine function?
Hi R help, I am trying to determine how nls() generates a function based on the self-starting SSlogis and what the formula for the function would be. I've scoured the help site, and other literature to try and figure this out but I still am unsure if I am correct in what I am coming up with. ************************************************************************** dat <- c(75.44855206,NA...
2002 Nov 25
2
Logistic Regression on a Windows Machine
...me. I just downloaded and installed the "precompiled binary distribution" of R to my Windows machine (running Windows Millennium). (I did not download or install anything else - no packages). I need to run a logistic regression and understand the function I need is polr() or maybe SSlogis(). However, when I try to invoke either function, I get Error: couldn't find function "polr" Error: couldn't find function "SSlogis" I have done some snooping on the website and think I may need the MASS package for polr() and the NLS package for SSlogis()....
2013 Mar 15
2
nlrob and robust nonlinear regression with upper and/or lower bounds on parameters
...y. Are there robust nonlinear regression methods that support upper and lower bounds? Or am I simply missing something with nlrob? I've included example code that should illustrate the issue. require(stats) require(robustbase) Dat <- NULL; Dat$x <- rep(1:25, 20) set.seed(1) Dat$y <- SSlogis(Dat$x, 10, 12, 2)*rnorm(500, 1, 0.1) plot(Dat) Dat.nls <- nls(y ~ SSlogis(x, Asym, mid, scal), data=Dat,start=list(Asym=1,mid=1,scal=1),lower=list(Asym=1,mid=1,scal=1)); Dat.nls lines(1:25, predict(Dat.nls, newdata=list(x=1:25)), col=1) Dat.nlrob <- nlrob(y ~ SSlogis(x, Asym, mid, scal),...
2009 Oct 02
1
nls not accepting control parameter?
...149398, 151074, 152241, 153919, 155580, 157258, 158981, 160591, 162126, 163743, 165213, 166695, 168023, 169522, 170746, 172057, 173287, 173977, 175232, 176308, 177484) ) nls( y ~ SSlogis(x, Asym, xmid, scal), data = dat, trace=TRUE) (newMinFactor <- 1/(4*1024)) nls( y ~ SSlogis(x, Asym, xmid, scal), data = dat, control=nls.control(minFactor=newMinFactor), trace=TRUE) nls( y ~ SSlogis(x, Asym, xmid, scal), data = dat, control=c(minFactor=newMinFactor), trace=TRUE) (newMinFact...
2011 Nov 17
3
Obtaining a derivative of nls() SSlogis function
Hello, I am wondering if someone can help me. I have the following function that I derived using nls() SSlogis. I would like to find its derivative. I thought I had done this using deriv(), but for some reason this isn't working out for me. Here is the function: asym <- 84.951 xmid <- 66.90742 scal <- -6.3 x.seq <- seq(1, 153,, 153) nls.fn <- asym/((1+exp((xmid-x.seq)/scal))) try #1 d...
2006 May 17
1
nlme model specification
Hi folks, I am tearing my hair out on this one. I am using an example from Pinheiro and Bates. ### this works data(Orange) mod.lis <- nlsList(circumference ~ SSlogis(age, Asymp, xmid, scal), data=Orange ) ### This works mod <- nlme(circumference ~ SSlogis(age, Asymp, xmid, scal), data=Orange, fixed = Asymp + xmid + scal ~ 1, start = fixef(mod.lis) ) ### I try a slightly different model specification for...
2008 Apr 14
3
Logistic regression
Dear all, I am trying to fit a non linear regression model to time series data. If I do this: reg.logis = nls(myVar~SSlogis(myTime,Asym,xmid,scal)) I get this error message (translated to English from French): Erreur in nls(y ~ 1/(1 + exp((xmid - x)/scal)), data = xy, start = list(xmid = aux[1], : le pas 0.000488281 became inferior to 'minFactor' of 0.000976562 I then tried to set the 'minFactor' v...
2004 Jul 28
0
Modelling compound logistic growth curves
Motivated by the discovery of 'loglet analysis' (http://phe.rockefeller.edu/LogletLab/) that allows one to decompose growth curves into a series of logistic equations, I attempted to do the same thing in R. SIMULATED DATA Time <- 1:200 pop.size <- SSlogis(Time,10,20,5) + SSlogis(Time,20,100,20) + rnorm(length(Time)) MY ANALYSIS results <- nls(size ~ SSlogis(Time, Asym1, xmid1, scal1) + SSlogis(Time, Asym2, xmid2, scal2), start = list(Asym1=5, xmid1=15, scal1=30, Asym2=25, xmid2=67, scal2=25)) THE RESULT I get the error message: Error in nls(si...
2004 Aug 16
0
Multiple logistic curves
...#39;m trying again just in case... Motivated by the discovery of 'loglet analysis' (http://phe.rockefeller.edu/LogletLab/) that allows decomposition of growth curves into a series of logistic equations, I attempted to do the same thing in R. #SIMULATED DATA Time <- 1:200 pop.size <- SSlogis(Time,10,20,5) + SSlogis(Time,20,100,20) + rnorm(length(Time)) ts.plot(pop.size) #MY ANALYSIS results <- nls(pop.size ~ SSlogis(Time, Asym1, xmid1, scal1) + SSlogis(Time, Asym2, xmid2, scal2), start = list(Asym1=5, xmid1=15, scal1=30, Asym2=25, xmid2=60, scal2=25)) THE RESULT I get the error m...
2001 Apr 29
1
Self-starting nls functions
Hello, I am doing several self-starting growth functions for using with nls(). When I list the self-starting functions included in nls library, for instance, SSlogis, there is: > SSlogis function (input, Asym, xmid, scal) ... <environment: 03476D20> attr(,"class") [1] "selfStart" What is this <environment: 03476D20> instruction? By using deriv() and then Selfstart(), I don't get this, although everything works fine with...
2005 Jul 26
1
evaluating variance functions in nlme
Hi, I guess this is a final plea, and maybe this should go to R-help but here goes. I am writing a set of functions for calibration and prediction, and to calculate standard errors and intervals I need the variance function to be evaluated at new prediction points. So for instance fit<-gnls(Y~SSlogis(foo,Asym,xmid,scal),weights=varPower()) fit2<-gnls(Y~SSlogis(foo,Asym,xmid,scal),weights=varPower(form=~foo)) Now using fit or fit2 I would like to get the variance function evaluated at new points. I have played with getCovariateFormula, and looked at Initialize.gnls, summary etc. but it is...
2008 Jan 04
1
Addendum: nls (with SSlogis model and upper limit) never returns (PR#10548)
Peter Dalgaard reminded me to be more specific about my computing platform; it's Debian 4.1.1-19 on a 32-bit Pentium 4 machine (Dell Optiplex GX620). The problem I described (nls not returning) also occurs with different data at other values of the scal parameter. Regards Hendrik Weisser --
2009 Dec 04
2
curve fitting to data
...41,144,144,145,149,150,158,159,163,174,183,187,242,248) y <- c(14.42,26.96,31.3,19.95,36.36,15.4,24.76,35.39,28.07,40.97,26.23,42.83,46.53,14.79,49.18,48.08) If I plot the data, it looks somehow that a logistic function would render good results. My questions are: How do I use nls and/or SSlogis (or other) to fit the curve? How can I see the summary statistics of the fit? How do I finally draw the line to my x,y (untransformed data) plot? Any help would be highly appreciated. Thank you and cheers Pascale -- ____________________________________..___________________ Dr. Pascale Webe...
2001 Jun 01
1
nls works but not gnls
This works fine: fit42<-nls(Vfs~SSlogis(Months,Asym.Int+Asym.Group*Groupdum,xmid,scal), data=df, start=c(Asym.Int=22,Asym.Group=5,xmid=2,scal=6), na.action=na.omit) But this, identical except using gnls, doesn't converge: fit43<-gnls(Vfs~SSlogis(Months,Asym.Int+Asym.Group*Groupdum,xmid,scal), data=df, start=c(Asym.Int=22,Asym.Gr...
2011 Feb 06
1
anova() interpretation and error message
...> Ca.P.Biomass.A P Biomass 1 334.5567 0.2870000 2 737.5400 0.5713333 3 894.5300 0.6393333 4 782.3800 0.5836667 5 857.5900 0.6003333 6 829.2700 0.5883333 I have fit the data using logistic, Michaelis?Menten, and linear model, they all give significance. > fm1 <- nls(Biomass~SSlogis(P, phi1, phi2, phi3), data=Ca.P.Biomass.A) > fm2 <- nls(Biomass~SSmicmen(P, phi1, phi2), data=Ca.P.Biomass.A) > fm3 <- lm(Biomass~P, data = Ca.P.Biomass.A) I hope to compare the difference among the three models, and I using anova(). As for the example here, the three models seem n...
2003 Aug 14
1
gnls - Step halving....
...initial values of the parameters those obtained from the nls fit. Is a problem of the initial estimates of the parameters that I get the error or could be something else? The code for the nls fit was: options(contrasts=c("contr.helmert","contr.poly")) VA1.lis<-nlsList(DRAM~SSlogis(MED,phi1,phi2,phi3)|TRAT, data=VA1,na.action=na.omit) The code for the gnls fit was (using a 'difference parameterization' like SAS): options(contrasts=c("contr.SAS","contr.poly")) VA1.gnls<-gnls(DRAM~SSlogis(MED,phi1,phi2,phi3), data=VA1,params=list(phi1~TRAT,phi...
2009 Jul 30
1
Continue to finish for loop even there is an error in one of rounds.
...s like below: Year <- c(1999: 2008) for(y in 1:length(year)) { file.input <- paste("C:\\", year[y], "\\data.csv", sep="") table <- read.csv(file=fileinput, header=TRUE, as.is=TRUE, na.strings=c("")) initial <- getInitial(percent ~ SSlogis(age, Asym, xmid, scal), data = table) fm1 <- nls(percent ~ SSlogis(age, Asym, xmid, scal), data = table) summary <- summary(fm1) parameters <- summary$parameters file.output <- paste("C:\\", year[y], "\\parameters.csv", sep="")...