newbie_2010 <girishbogu <at> gmail.com> writes: > a1 is the first key in input. second column is x-axis and 3rd is y-axis and > 4th is its corresponding key. > Now for every key in 1st column I would like to calculate LR that gives p > value. I tried to manage with a single key. But my problem is that How could > I manage multiple keys in input. > Thanx in advance >
something like: library(nlme) fm <- lmList(y~x|key,data=...) get.pval <- function(z) { x <- summary(z) pf(x$fstatistic[1L], x$fstatistic[2L], x$fstatistic[3L], lower.tail = FALSE) } sapply(fm,get.pval) ______________________________________________ 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.