the correp packagefor r - portalukc – universitätsinstitut für klinische chemie data preparation...

13
The CORREP package for R multivariate correlation estimation for replicated data … and an ‘unusual’ application http://cran.rproject.org/web/packages/CORREP

Upload: others

Post on 27-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The CORREP packagefor R - PortalUKC – Universitätsinstitut für Klinische Chemie Data preparation d

The CORREP package for R

multivariate correlation estimation for replicated data

… and an ‘unusual’ application

http://cran.r‐project.org/web/packages/CORREP

Page 2: The CORREP packagefor R - PortalUKC – Universitätsinstitut für Klinische Chemie Data preparation d

UKC – Universitätsinstitut für Klinische Chemie

Prologue – the DIRECT study:

The DIRECT st dThe DIRECT study:

• 2‐year trial

• Enrollment 2004

• 322 participants

• 3 different diets

Closed environment

→  high compliance→ g p

CORREP – multivariate correlation estimation 2

Page 3: The CORREP packagefor R - PortalUKC – Universitätsinstitut für Klinische Chemie Data preparation d

UKC – Universitätsinstitut für Klinische Chemie

Prologue –DIRECT results: weight loss and altered lipids

Weight loss [kg] Total Cholesterol/HDL

months months

What we got:

CORREP – multivariate correlation estimation 3

Samples of 90male participants (28/28/34) at 0, 6, and 24 months (n=270).

Page 4: The CORREP packagefor R - PortalUKC – Universitätsinstitut für Klinische Chemie Data preparation d

UKC – Universitätsinstitut für Klinische Chemie

DIRECT – 2‐year diet affecting cholesterol metabolism?

CORREP – multivariate correlation estimation 4

Page 5: The CORREP packagefor R - PortalUKC – Universitätsinstitut für Klinische Chemie Data preparation d

UKC – Universitätsinstitut für Klinische Chemie

DIRECT – What about covariates (e.g. BMI or HOMA‐IR)?

That‘s it?

CORREP – multivariate correlation estimation 5

That s it?

Page 6: The CORREP packagefor R - PortalUKC – Universitätsinstitut für Klinische Chemie Data preparation d

UKC – Universitätsinstitut für Klinische Chemie

DIRECT – What the reviewers said…

4. Statistics: I am suspicious of the data for correlations described as ‘over all time points’. […] It would not be correct to introduce repeated measurements fromintroduce repeated measurements from individual subjects as independent measurements.measurements.

16. Figure 4.  Is each man represented only once?  If not, does the Kendall’s test adjust for multiple contributions by a single man?

CORREP – multivariate correlation estimation 6

single man?

Page 7: The CORREP packagefor R - PortalUKC – Universitätsinstitut für Klinische Chemie Data preparation d

UKC – Universitätsinstitut für Klinische Chemie

DIRECT – remind:   n=90 at 0, 6, and 24 months.

CORREP – multivariate correlation estimation 7

What if…  …timepoints are only replicates?

Page 8: The CORREP packagefor R - PortalUKC – Universitätsinstitut für Klinische Chemie Data preparation d

UKC – Universitätsinstitut für Klinische Chemie

Data preparationd <- as.matrix(Datenmatrix) d0 <- t(d)

p p

## This step is to make the std.-deviation of each replicate equals to 1## so that we can model the covariance matrix as correlation matrix.d0.std <- apply(d0, 1, function(x) x/sd(x))

patientsreplicates

CORREP – multivariate correlation estimation 8

Page 9: The CORREP packagefor R - PortalUKC – Universitätsinstitut für Klinische Chemie Data preparation d

UKC – Universitätsinstitut für Klinische Chemie

Computation of the correlation matrix M

M < cor balance(t(d0 std) m=3 G=4) # Computation of MM <- cor.balance(t(d0.std), m=3, G=4) # Computation of M

balance: equal number of replicates assumed

m: number of replicates per ‚gene‘

G: number of different ‚genes‘ (e.g. ‚BMI‘ or ‚LaCh‘ )

CORREP – multivariate correlation estimation 9

Page 10: The CORREP packagefor R - PortalUKC – Universitätsinstitut für Klinische Chemie Data preparation d

UKC – Universitätsinstitut für Klinische Chemie

Revision #2:l dd h lPlease add the P values

for the correlations.

CORREP – multivariate correlation estimation 10

Page 11: The CORREP packagefor R - PortalUKC – Universitätsinstitut für Klinische Chemie Data preparation d

UKC – Universitätsinstitut für Klinische Chemie

Computation of the LR‐testp

#Select rows for gene 1 and gene 2g <-d0.std[,c(1,2,3,4,5,6)]g < d0.std[,c(1,2,3,4,5,6)]

#Perform the LR-test (m: number of replicates)cor.LRtest(t(g),m1=3,m2=3)( (g), , )

# Example: Result for BMI-LaChpcor.LRtest(t(g),m1=3,m2=3)[1] 4.861361e-06

CORREP – multivariate correlation estimation 11

Page 12: The CORREP packagefor R - PortalUKC – Universitätsinstitut für Klinische Chemie Data preparation d

UKC – Universitätsinstitut für Klinische Chemie

CORREP – multivariate correlation estimation 12

Page 13: The CORREP packagefor R - PortalUKC – Universitätsinstitut für Klinische Chemie Data preparation d

UKC – Universitätsinstitut für Klinische Chemie

DIRECT: Finally…..

Am J Clin Nutr. 2011 Nov;94(5):1189‐95. Epub 2011 Sep 21.

CORREP – multivariate correlation estimation 13

Am J Clin Nutr. 2011 Nov;94(5):1189 95. Epub 2011 Sep 21.PMID: 21940598 (Free Article)