search for: meanss

Displaying 5 results from an estimated 5 matches for "meanss".

Did you mean: means
2009 Jun 08
2
help to speed up loops in r
...r is very slow (2days). Any suggestions to speed it up. NB I have also tried using rowMeans rather than adding the 2 values and dividing by 2. (same problem) #SCRIPT STARTS for (i in 1:length(averagedreplicates[,1])) #for (i in 1:dim(averagedreplicates)[1]) { cat(i,'\n') #calculates Meanss #Sample A averagedreplicates[i,2] <- (zz[i,2] + zz[i,3])/2 averagedreplicates[i,3] <- (zz[i,4] + zz[i,5])/2 averagedreplicates[i,4] <- (zz[i,6] + zz[i,7])/2 averagedreplicates[i,5] <- (zz[i,8] + zz[i,9])/2 averagedreplicates[i,6] <- (zz[i,10] + zz[i,11])/2 #Sample B averagedreplicat...
2009 May 15
2
Help with loops
...am trying to average each set of values (i.e. zz[1,2:3] averaged and placed in average_value[1,2] and so on. below is my script but it seems to be stuck in an endless loop Any suggestions?? for (i in 1:length(average_value[,1])) { average_value[i] <- i^100; print(average_value[i]) #calculates Meanss #Sample A average_value[i,2] <- rowMeans(zz[i,2:3]) average_value[i,3] <- rowMeans(zz[i,4:5]) average_value[i,4] <- rowMeans(zz[i,6:7]) average_value[i,5] <- rowMeans(zz[i,8:9]) average_value[i,6] <- rowMeans(zz[i,10:11]) #Sample B average_value[i,7] <- rowMeans(zz[i,12:13]) aver...
2009 May 15
1
Fw: Help with loops(corrected question)
...eadings in zz[,1] > I am trying to average each set of values (i.e. zz[1,2:3] > averaged and placed in average_value[1,2] and so on. > below is my script but it seems to be stuck in an endless > loop > Any suggestions?? > > for (i in 1:length(zz[,1])) { > > #calculates Meanss > #Sample A > average_value[i,2] <- rowMeans(zz[i,2:3]) > average_value[i,3] <- rowMeans(zz[i,4:5]) > average_value[i,4] <- rowMeans(zz[i,6:7]) > average_value[i,5] <- rowMeans(zz[i,8:9]) > average_value[i,6] <- rowMeans(zz[i,10:11]) > > #Sample B > averag...
2010 Apr 24
2
multiple paired t-tests without loops
I am new to R and I suspect my problem is easily solved, but I haven't been able to figure it out without using loops. I am trying to implement Blair & Karniski's (1993) permutation test. I've included a sample data frame below. This data frame represents the conditional means (C1, C2) for 3 subjects in 2 consecutive samples of a continuous data set (e.g. ERP waveform).
2002 May 02
2
problem with lme in nlme package
...2.9421 0.15122 7022 19.456 <.0001 sectorCatholic 1.2245 0.30611 157 4.000 1e-04 meanses:cses 1.0444 0.29107 7022 3.588 3e-04 cses:sectorCatholic -1.6421 0.23312 7022 -7.044 <.0001 Correlation: (Intr) meanss cses sctrCt mnss:c meanses 0.256 cses 0.000 0.000 sectorCatholic -0.699 -0.356 0.000 meanses:cses 0.000 0.000 0.295 0.000 cses:sectorCatholic 0.000 0.000 -0.696 0.000 -0.351 Standardized Within-Group Residuals:...