
Hi,
First let me thank you for the incredible help and resource that this forum is.
I am trying to compare the  repeated measurement of more than 100 analytes that have been take in 70 subjects at 2 time points adjusted for the time difference of sample times(TimeDifferenceDays), therefore I wanted to do it with a function that allows me to do all at once. (131 is the column difference that separates the two different measurements of the same anlyte)
I have this one:
for(i in 1:125){return(summary(lm(Data[,i] ~ Data[,(i+131)] + Data$TimeDifferenceDays)))}
But it only gives me one result

I also wanted to get the p-value in a dataframe with three columns:
Fitst column: analyte name (that´s the name of the column)Second column: pvalue of the first measure of the analte predicting the second measureThird column: The effect of time

I copy a samller example:


txt <- "V1a  V2a  V3a  V1b  V2b  V3b   TimeDifferenceDays2.42  72.4 3.75 2.46 55.4 4.44 6081.66 89.7 2.54 2.17 94.0 2.15 4192.45 112. 0.46 2.40 129.0 .42 7142.58 55.6 5.05 2.44 135.0 5.39 7212.61 332.0 22.6 3.55 238.0 16.4 729"
Data <- read.table(textConnection(txt), header = TRUE)
Thank you
Jon Toledo, MD

Postdoctoral fellow
University of Pennsylvania School of Medicine
Center for Neurodegenerative Disease Research

 		 	   		  
	[[alternative HTML version deleted]]

