| To: | <s-news@lists.biostat.wustl.edu> |
|---|---|
| Subject: | NLME and grouping functions |
| From: | "Roberts, J. Kyle" <jkrobert@bcm.tmc.edu> |
| Date: | Fri, 16 Jun 2006 11:11:34 -0500 |
| References: | <56484410CF26D747A645BE746C57CE6D021A8D08@SCIUSFREXS3.na.jnj.com> |
| Thread-index: | AcaRVj9DIJu9YvQdTiO6bHEihNB8EQACGFyD |
| Thread-topic: | NLME and grouping functions |
|
Dear All,
I want to correlated the predicted values from a "lme" run, and the
original outcome values from the original dataset. The caveat is that I
want to do it honoring the grouping structure.
So far, I have done this:
new<-split(data.frame(my.data$outcome, predict(lme.out)),
my.data$group)
new.2<-lapply(new, cor)
The problem is that I now have a list in which each part of the
list has the following:
$"1":
X1 X2 X1 1.0000000 0.9327732 X2 0.9327732 1.0000000 $"2":
X1 X2 X1 1.0000000 0.9449112 X2 0.9449112 1.0000000 . . . etc. So here's my question: How do I just get the correlation
between the two variables and not have a correlation matrix? The reason
that I ask is because I will need to then unlist these correlations to include
in another function I have built.
Thanks for the help,
Kyle
***************************************
J. Kyle Roberts, Ph.D.
Baylor College of Medicine
Center for Educational
Outreach
One Baylor Plaza, MS:
BCM411
Houston, TX
77030-3411
713-798-6672 - 713-798-8201
Fax
*************************************** |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: bootstrapping of multiple datasets, Barker, Chris [SCIUS] |
|---|---|
| Next by Date: | Mclust, Graham Leask |
| Previous by Thread: | Re: bootstrapping of multiple datasets, Barker, Chris [SCIUS] |
| Next by Thread: | Re: NLME and grouping functions, Spencer Graves |
| Indexes: | [Date] [Thread] [Top] [All Lists] |