I. Necessary Numbers

To run the program, the user has to prepare the following numbers: 
-- number of subjects
-- number of responses
-- number of covariates
-- degree of freedom
-- number of wild bootstrap iterations
-- number of dimension after projection


II. Necessary Data and Data Format

Remember, the program itself won't and can't deal with missing values; you have to do it before run the program.

To run the program, the user has to prepare the following data set:
-- response
-- covariate (intercept is automatically included in the program)
-- the R matrix in the hypothesis testing (including the intercept)
-- a one-row vector to indicate which column forms full rank for R matrix


-- response
Each subject has one row and each column represent one response; each column separates from each other by a space 

e.g. 
(y_ij means the j's response to the i's subject)
response.txt should be looked like this:

y_11 y_12 y_13
y_21 y_22 y_23
y_31 y_32 y_33


-- covariate
Each subject has one row and each column represent one covariate; each column separates from each other by a space; intercept IS automatically included in the program

e.g.
(x_ij means the j's covariate to the i's subject)
covariate.txt should be looked like this:

x_11 x_12 
x_21 x_22
x_31 x_32



-- R matrix
The exact R matrix as in original paper; the use should include intercept in R 

e.g. To test the effect from 1st covariate and 2nd covariate simultaneously in X

0 1 0
0 0 1

-- a one-row vector to indicate which column forms full rank for R matrix
Following from the R matrix example:

0 1 1



III. Sparse PCA R package specification (optional step):
1. Specify the document names of the input matrix which will be used to estimate weight via sparse PCA ("input_covariance.txt" as default) and the output matrix which contains the sparse eigenvector from input matrix ("output.txt" as default)
2. Specify the nodes for lambda_1 and lambda_2 in spca





IV. Commands run the compiled program
It is highly suggested to put the run_spca.r in the same folder of the compiled program

1. Run on server:
bsub "full_path_program_without_double_quote_outside.your_program" input_covariance.txt run_spca.r output.txt
2. Run on PC:
"full_path_program_without_double_quote_outside.your_program" input_covariance.txt run_spca.r output.txt






V. Result from the program
After the program is finished, the p-value and the number of wild-bootstrap will be shown on screen. Also the output.summary and output.pvalue give the detail information of the result and data set






