Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x <- c(10, 9, 5, 6, 7, 4, 3, 5, 6, 8)
- y <- c(1,2,1,2,2,1,3,3,1,2)
- "pPareto" <- function(x, alpha, x0)
- {
- result <- 1 - (x0/(x+x0))^alpha
- return(result)
- }
- install.packages("truncgof")
- library(MASS)
- library(truncgof)
- set.seed(123)
- treshold <- y
- xc <- x # complete sample
- xt <- xc[xc >= y] # left truncated sample
- ks.test(xt, "pPareto", list(alpha = 2, x0 = location), H = y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement