Displaying 2 results from an estimated 2 matches for "cc_f".
Did you mean:
cc_
2011 Apr 20
2
question regarding qmvnorm
...ith the old
mvtnorm package.
Somehow with the updated package, I got a error message when trying to use
the function.
I need some help. It is sort of urgent. Can anyone please take a look. The
function is the following.
Thank you very much!
Hannah
library(mvtnorm)
cc_f <- function(m, rho, k, alpha) {
m <- 10
rho <- 0.1
k <- 2
alpha <- 0.05
cc_z <- numeric(m)
var <- matrix(c(1,rho,rho,1), nrow=2, ncol=2, byrow=T)
for (i in 1:m){
if (i <= k) {cc_z[i] <- qmvnorm((k*(k-1))/(m*(m-1))*alpha, tail="upper",
sigma=var)$quan...
2010 Jun 23
2
question about a program
...function works extremely
slow. For example I chose
m <- 10
rho <- 0.1
k <- 2
alpha <- 0.05
pvaluessort <- sort(1-pnorm(rnorm(10))
Is there anything that I did wrong?
Thank you!
Hannah
######Program with two functions############
## first step
library(mvtnorm)
cc_f <- function(m, rho, k, alpha) {
cc_z <- numeric(m)
var <- matrix(c(1,rho,rho,1), nrow=2, ncol=2, byrow=T)
for (i in 1:m){
if (i <= k) {cc_z[i] <- qmvnorm((k*(k-1))/(m*(m-1))*alpha, tail="upper",
sigma=var)$quantile} else
{cc_z[i] <- qmvnorm((k*(k-1))/(...