search for: catmedian

Displaying 1 result from an estimated 1 matches for "catmedian".

2009 Nov 18
2
Median on Aggregated data
...re a simple way to do the same thing in R? I have to run this on a large dataset -- for a small set it is not a problem. ---------------------- Begin R code ------------------------------------ N <- 1005 * 14; myNorm <- data.frame(PaydexNormingCategory = numeric(N), SIC = numeric(N), CatMedian = numeric(N)); k=1; #j = 7941; ## For testing only for (j in levels(SIC)){ for (i in levels(PaydexNormingCategory)){ myData <- dfpaydex[(Paydex==i) & (SIC==j),]; myMedian <- with(myData, levels(Paydex)[median(rep(as.numeric(Paydex), Counts))]); myNorm[k] <-c( as.numeric(i), as.n...