powered by
Remove the linear main effect for adjustment
lm.rm(Y, X)
Y is the data matrix for response variables. Each row represents the observations of a individual and each column represents a variable.
X is the data matrix for adjustment. Each colum represents a variable for adjustment.i
The update matrix Y with adjustment for the covariates.
Remove the main effect by using lienar regression for adjustment of the covariates.
# NOT RUN { Y = matrix(rnorm(50,1,2),nrow=10); X = matrix(rnorm(20,0,1),nrow=10); rlt = lm.rm(Y,X); # }
Run the code above in your browser using DataLab