search for: rand_skewt

Displaying 1 result from an estimated 1 matches for "rand_skewt".

2009 Jun 23
0
looping problem
...   I try to do a looping to produce ‘rand’ for different values of degrees of freedom (degf).  Actually, I’m not sure how to specify the attribute for the rand.  As we know, rand will give us a set of results + all the parameters used, so just wonder whether we can do the same for this iteration.   rand_skewt <- function(dt,degf,n) { t1    <- length(degf)   rand  <- matrix(dt,nrow=n)   xi    <- colMeans(dt)   Omega <- var(dt)   alpha <- skew(dt,na.rm = TRUE)   for (i in 1:t1) {  rand[i] <- rmst(n,xi, Omega, alpha, df=degf[i])[1:n,1:2] }    rand }   dt <- yypos[1:10,]; degf <-...