[R] Hospital ANOVA/ANCOVA problem
edamamebuffet
alanhfung at gmail.com
Wed Nov 24 21:18:13 CET 2010
Hi everyone,
I've only been using R for a week or so now, and am now required to work
with some pretty mixed data at my hospital.
Basically, we're looking to see if hypertension status (nominal) affects
cardiac function (multiple & continuous). In order to do this, we've
collected multiple echocardiograph data reports on each patient.
1. Each patient is coded either as 0 or 1 for hypertension (HT).
2. Each patient then has multiple echo reports (numbering anywhere from 1 to
20) with variables (A, B, C, D, E, F, etc) for each report
3. I want to see if A, B, C, D are individually correlated to hypertension
status.
The problem is that we must also take into account how old the echo report
is since the heart takes time to remodel/change.
Independent variables: hypertension status (HT - nominal) and echo time
since transplant (ECHO_DAYS - continuous)
Dependent variables: echo report parameters, some of which may be related.
(A, B, C, D, E, F, etc - continuous)
The dataset looks like this:
ID HT ECHO_DAYS A B C D
1 0 23 11 25 19 45
1 0 50 77 37 43 85
1 0 70 NA 8 NA 95
1 0 100 89 16 70 82
1 0 134 44 54 76 58
2 1 12 14 93 86 77
2 1 23 39 53 87 38
5 1 30 NA NA NA 53
5 1 39 89 15 19 95
5 1 40 35 9 63 81
5 1 41 47 3 94 NA
7 0 48 97 68 66 NA
7 0 32 36 86 29 69
9 1 34 53 19 34 86
9 1 1174 86 62 40 73
9 1 1880 43 84 35 88
9 1 370 17 19 54 6
Currently I'm using:
aov.a2 =aov(A~(HT+ECHO_DAYS)+Error(ID/(HT+ECHO_DAYS)))
1. Can anyone verify that this usage is correct?
2. If not, what is the best way to calculate and graph the ANOVA/ANCOVA I'm
looking for.
3. Please excuse my ignorance. Again, statistics is not my forte...
Thank you!
--
View this message in context: http://r.789695.n4.nabble.com/Hospital-ANOVA-ANCOVA-problem-tp3058020p3058020.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list