Message-ID: <8F4C481EBCA71E45845A4CD0778F60E404542DBF@exmbx2010-8.campus.MCGILL.CA>
Date: 2012-07-31T20:33:40Z
From: R Heberto Ghezzo, Dr
Subject: help with a regression
Hello, I have a data frame with the following variables:
ID, X1,X2,X3,X4,X5,Y1,Y2,Y3,Y4,Y5 and some other that do not matter, some of the X and Y can be missing (NA). I want to compute the slope of the linear regression Y ~ X for each subject, so using
apply(DF,1,FUN,ra.rm=TRUE) now How do I define FUN? The X are different for each subject.
Thanks for any help
R.Heberto Ghezzo Ph.D.
Montreal - Canada