Difference between these two R functions

后端 未结 1 1301
抹茶落季
抹茶落季 2021-01-29 06:55

I am trying to illustrate the three types of extreme value distributions in R.

For type one, the distribution function is as follows.

相关标签:
1条回答
  • 2021-01-29 07:43

    The problem is that the || operator only looks at the first element of z<b and z==b. This should work:

    G2 <- function(z, a, b, alpha)
        ifelse(z<=b, 0,exp(-((z-b)/a)^(-alpha)))
    
    0 讨论(0)
提交回复
热议问题