[R] simulation of levene's test
dila
dila8702 at gmail.com
Mon May 28 15:21:14 CEST 2012
hello,
I try to run simulation of levene's test to find the p-value but the error
of replacement has length zero occur, could anyone help me to fix this
problem?
asim <- 1000
pv<-rep(NA,asim)
for(i in 1:asim)
{print(i)
set.seed(i)
g1 <- rnorm(20,0,2)
g2 <- rnorm(20,0,2)
g3 <- rnorm(20,0,2)
x <- c(g1,g2,g3)
group<-as.factor(c(rep(1,20),rep(2,20),rep(3,20)))
library(Rcmdr)
pv[i]<-leveneTest(x,group)$p.value
}
--
View this message in context: http://r.789695.n4.nabble.com/simulation-of-levene-s-test-tp4631578.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list