Calculate the derivative of a data-function in r

前端 未结 4 1697
忘了有多久
忘了有多久 2020-12-17 05:08

Is there an easy way to calculate the derivative of non-liner functions that are give by data?

for example:

x = 1 / c(1000:1)

y = x^-1.5
ycs = cumsu         


        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-17 05:31

    Generating derivatives from raw data is risky unless you are very careful. Not for nothing is this process known as "error multiplier." Unless you know the noise content of your data and take some action (e.g. spline) to remove the noise prior to differentiation, you may well end up with a scary curve indeed.

提交回复
热议问题