search for: numtests

Displaying 6 results from an estimated 6 matches for "numtests".

2007 Aug 09
1
How to apply functions over rows of multiple matrices
Dear ExpRts, I would like to perform a function with two arguments over the rows of two matrices. There are a couple of *applys (including mApply in Hmisc) but I haven't found out how to do it straightforward. Applying to row indices works, but looks like a poor hack to me: sens <- function(test, gold) { if (any(gold==1)) { sum(test[which(gold==1)]/sum(which(gold==1))) } else NA }
2011 Sep 07
4
suggestion for proportions
Hi, I am wondering if anyone can suggest how to test the equality of 2 proportions. The caveat here is that the 2 proportions were calculated from the same number of samples using 2 different tests. So essentially we are comparing 2 accuracy rates from same, say 100, samples. I think this is like a paired test, but don't know if really we need to consider the "paired" nature of the
2007 Aug 10
1
[Fwd: Re: How to apply functions over rows of multiple matrices]
[Apologies to Gabor, who I sent a personal copy of the reply erroneously instead of posting to List directly] [...] > Perhaps what you really intend is to > take the average over those elements in each row of the first matrix which correspond to 1's in the second in the corresponding > row of the second. In that case its just: > > rowSums(newtest * goldstandard) /
2010 Sep 20
3
Depletion of small p values upon iterative testing of identical normal distributions
...er. Is there any reason, perhaps to do with random number generation in R or the nature of the normal distribution simulated by the rnorm function that could explain this depletion? Here are two key parts of my code to show what functions I'm working with: #Calculating the p values while(i<numtests){ Group1<-rnorm(6,-0.0065,0.0837) Group2<-rnorm(6,-0.0065,0.0837) PV<-t.test(Group1,Group2)$p.value pscoresvector<-c(PV,pscoresvector) i<-i+1 } #Binning the results freqtbl1<-binning(pscoresvector,breaks=bins) Thanks in advance for any insights, Andrew [[alternative HTML vers...
2006 Jan 10
1
Find last row (observation) for each combination of variables
Let's say I have a data.frame like A B C TS other columns 1 1 1 12345 1 1 1 56789 1 2 1 23456 1 2 2 23457 2 4 7 23458 2 4 7 34567 2 4 7 45678 and I want the last row for each unique combination of A/B/C, where by "last" I mean greatest TS. A B C TS other columns 1 1 1 56789 1 2 1 23456 1 2 2 23457 2 4 7 45678 I did this simply in SAS: proc sort data=DF; by A B C descending TS
2007 Aug 11
0
DOE and interaction plot general question
This is a general question about Design of experiments. If i am not allowed to post general questions like this here please accept my apologies and ignore the question. I did a DOE with six factors in eight runs. I know i cannot check for interactions using this design, but i tried the interaction plot and it showed me many interactions. After this I foldover the design and ran the 8 runs to learn