[R] How to get slope estimates from a four parameter logistic with SSfpl?

Prof. John C Nash nashjc at uottawa.ca
Tue Oct 20 14:27:36 CEST 2009


Is the following helpful?

  pdd<-deriv(~a+(b-a)/(1+exp((c-t)/d)),"d")
 > pdd
expression({
     .expr1 <- b - a
     .expr2 <- c - t
     .expr4 <- exp(.expr2/d)
     .expr5 <- 1 + .expr4
     .value <- a + .expr1/.expr5
     .grad <- array(0, c(length(.value), 1L), list(NULL, c("d")))
     .grad[, "d"] <- .expr1 * (.expr4 * (.expr2/d^2))/.expr5^2
     attr(.value, "gradient") <- .grad
     .value
})

Or perhaps you want it with respect to "t"?

JN


> Message: 46
> Date: Mon, 19 Oct 2009 14:50:15 +0100
> From: "Weber, Sam" <Sam.Weber at exeter.ac.uk>
> Subject: [R] How to get slope estimates from a four parameter logistic
> 	with SSfpl?
> To: "r-help at R-project.org" <r-help at r-project.org>
> Message-ID:
> 	<5BB78285B60F9B4DB2C6A4DA8F3E788C12C64B3803 at EXCHMBS04.isad.isadroot.ex.ac.uk>
> 	
> Content-Type: text/plain
> 
> Hi,
> 
> I was hoping to get some advice on how to derive estimates of slopes from four parameter logistic models fit with SSfpl.
> 
> I fit the model using:
> 
> model<-nls(temp~SSfpl(time,a,b,c,d))
> summary(model)
> 
> I am interested in the values of the lower and upper asymptotes (parameters a and b), but also in the gradient of the line at the inflection point (c) which I assume tells me my rate of increase when it is steepest (?).
> 
> However, I cannot work out how to derive a slope estimate. I'm guessing it has something to do with the scaling parameter d but having searched the internet for hours I have not made any progress, and it is probably quite simple. Any help would be hugely appreciated!
> 
> All the best
> 
> Sam




More information about the R-help mailing list