Skip to main content
An official website of the United States government
Government Funding Lapse
Because of a lapse in government funding, the information on this website may not be up to date, transactions submitted via the website may not be processed, and the agency may not be able to respond to inquiries until appropriations are enacted.

The NIH Clinical Center (the research hospital of NIH) is open. For more details about its operating status, please visit cc.nih.gov.

Updates regarding government operating status and resumption of normal operations can be found at opm.gov.

User Defined

Below are steps to define your own test for CRaVe. A maximum of 5 user defined tests are allowed.

C function:

  1. Edit the function c1 in the file user_define.c. The function name, input arguments and return type CANNOT be modified.
  2. Issue the command "make clean" and then "make".
  3. To include this test in an anlaysis, set the option tests=c1,...
  4. For additional tests, modify the functions c2, c3, c4, c5 in the file user_defined.c.

 

R function:

  1. Write an R function with 4 input arguments, where argument 1 is the vector of delta values, argument 2 is the covariance matrix, argument 3 is the correlation matrix, and argument 4 is the inverse correlation matrix.
    Example: fnc1 <- function(delta, cov, cor, invcor) { return(sum(delta*delta)) }
  2. In the options list for the crave function, set the option user_func to the name of the function.
    Example: crave(geno_file, pheno_file, out_file, op=list(user_func="fnc1"))
  3. For additional tests, set the option user_func to be a vector of function names.
Email