I fit my CDF to sum of exponentials and now I want to take the numerical
derivative of this function to obtain probability density.I will really
appreciate your help reagrding the error messages I am getting which I don't
understand.
*
*
> fitterma <- function(xtime) {
a <- -0.09144115
b <- -0.01335756
c <- -2.368057
d <- -0.00600052
return(exp(a+b*xtime)+exp(c+d*xtime))
}
> numericDeriv(fitterma,"xtime")
*Error in numericDeriv(fitterma, "xtime") : *
* cannot coerce type 'closure' to vector of type 'double'*
*
*
*Thanks,*
*parmee*
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.