R/rMaxAR.R

Defines functions rFrechet rMaxAR

Documented in rFrechet rMaxAR

rFrechet <- function(n){
  -1/log(runif(n))
}

rMaxAR <- function(n,theta)
{
  x <- rFrechet(n)
  
  y <- rbind(rep(x[1],2),cbind((1-theta)*x[-n], x[-1]))
  
  y <- apply(y,1, max)
  
  y

}

Try the texmex package in your browser

Any scripts or data that you put into this service are public.

texmex documentation built on May 2, 2019, 4:56 p.m.