Dear All, I would be most grateful for help on this problem.
I have a binary response variable. It is classified by various factors. I would like to have a table with; column 1 frequency response is 1 / (frequency the response is 1 + frequency the response is 0) #given the classifying factors are the same column 2...(n-1) states of classifying factors column 3 (frequency the response is 1 + frequency the response is 0) I want to do this to reduce the size of my table so i can use it for logistic regression without running out of memory. some example data to illustrate the problem; response <- c(0,1,0,1,0,0,0,1) predictor.a <- c(10,10,20,20,50,50,50,50) predictor.b <- c(2,2,3,3,5,5,5,5) frame <- data.frame(r = response, p.a = predictor.a, p.b = predictor.b) > frame r p.a p.b 1 0 10 2 2 1 10 2 3 0 20 3 4 1 20 3 5 0 50 5 6 1 50 5 desired result........ f p.a p.b freq 0.5 10 2 2 0.5 20 3 2 0.25 50 5 4 many thanks, Hugh [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.