Learn R Programming

QRFCCA (version 1.0)

lm.rm: Remove the linear main effect

Description

Remove the linear main effect for adjustment

Usage

lm.rm(Y, X)

Arguments

Y

Y is the data matrix for response variables. Each row represents the observations of a individual and each column represents a variable.

X

X is the data matrix for adjustment. Each colum represents a variable for adjustment.i

Value

The update matrix Y with adjustment for the covariates.

Details

Remove the main effect by using lienar regression for adjustment of the covariates.

Examples

Run this code
# 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