[R] fixed trimmed mean for j-group

2012-06-14 Thread umai88
Hello...i want to find the empirical rate for type 1 error using fixed trimmed mean. To make it easy, i'm referring to journal given by this website http://www.academicjournals.org/ajmcsr/PDF/pdf2011/Yusof%20et%20al.pdf. I already run the programme and there is no error in it but i got zero for th

[R] need help to find type I error rate for modified F statistic

2012-05-28 Thread umai88
Hello everyone, I want to calculate type I error rate for modified F statistic for one way robust anova. I need to find the j group trimmed mean and winsorized sum of squared deviations. Here I attached my code for j=2 to make it simple. Originally I have j=4. Hope you can help. I need to run it f

[R] obtain type I error from modified F statistic

2012-05-28 Thread umai88
i want to find type I error rates using modified F statistic..below is my R code.. h=0 g=0 n=15 alpha=0.1 k=floor(alpha*n)+1 r=k-(alpha*n) i=k+1 m=n-k J=4 trim1<-rep(NA,asim) trim2<-rep(NA,asim) trim3<-rep(NA,asim) trim4<-rep(NA,asim) pw<-rep(NA,asim) qw<-rep(NA,asim) px<-rep(NA,asi

[R] code to iterate function apply to matrix

2012-05-15 Thread umai88
I got this code below and i want to repeat the loop for 100 times.. x<-rnorm(60) mat1<-matrix(x,nrow=15,ncol=4) trim<-numeric(ncol(mat1)) win<-numeric(ncol(mat1)) ssd<-numeric(ncol(mat1)) for(j in 1:ncol(mat1)) { n=length(mat1[,j]) alpha=0.1 k=floor(alpha*n)+1 r=k-(alpha*n) i=k+1 m=n-k y1<-sort(