Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wykres2 <- function(sigma2){
- for (i in 1:10000){
- X <- rcauchy(n, mu1, sigma1)
- Y <- rcauchy(m, mu2, sigma2)
- Z <- c(X, Y)
- R <- rank(Z)
- T2[i] <- (sqrt(m*n/N)*(1/m*sum(f2((R[1:m]-0.05)/N))-1/n*sum(f2((R[(m+1):N]-0.05)/N))))^2
- }
- moc2 <- sum(abs(T2)>k2)/10000
- return(moc2)
- }
- w12 <- wykres2(1.0)
- w22 <- wykres2(1.5)
- w32 <- wykres2(2.0)
- w42 <- wykres2(2.5)
- w52 <- wykres2(3.0)
- w62 <- wykres2(3.5)
- w72 <- wykres2(4.0)
- dane2 <- matrix(c(w12,w22,w32,w42,w52,w62,w72),ncol=1)
- dane22 <- matrix(c("1.0","1.5","2.0","2.5","3.0","3.5","4.0"),ncol=1)
- ramka2 <- cbind(dane22,as.numeric(dane2))
- colnames(ramka2) <- c("mi","moc" )
- ramka2 <- as.table(ramka2)
- mean2 <- ramka2[,1]
- power2 <- ramka2[,2]
- plot(mean2,power2,ylim=c(0,1.0),col="red")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement