Advertisement
Guest User

Untitled

a guest
Nov 27th, 2018
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. library(VGAM)
  2. theta <-2;
  3. n <- 100
  4. x <-rlaplace(n,scale=theta)
  5. fn <- function(X,theta=2){(1/2*theta)^n*exp((-1/theta)*sum(abs(X)))}
  6. x = sort(x)
  7. output = sapply(x,fn)
  8. plot(x,output,type="l")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement