Displaying 1 result from an estimated 1 matches for "bestsample".
2008 Aug 22
1
Retrieving sample points
...n,h), ncol=h)
+ for (i in 1:nchoosek(n,h)){
+ flag <- sample(1:n, h, replace=FALSE)
+ z <- x[flag,]
+ y <- eigen(var(z), only.values=TRUE)$values
+ vec11[i,] <- y
+ vec12[i,] <- flag
+ }
+ product <- apply(vec11,1,prod)
+ best <- which.min(product)
+ sample <- vec12[best,]
+ bestsample <- x[sample,]
+ return(bestsample)
+ }
Thanks
Oyeyemi, Gafar Matanmi
Department of Statistics
University of Ilorin
Ilorin, Nigeria
[[alternative HTML version deleted]]