R/Null_model.R

Defines functions Null_model

Documented in Null_model

#' Fit the null model
#' This function provides null model fit. The default option is to use quantreg since it is faster. When
#' dataset is too large, quantreg will have memory limitation issue, and we will use the self-implemented
#' algorithm.
#' @param Y A vector of response, size \eqn{n}.
#' @param C A vector or matrix of covariates.
#' @import quantreg Matrix MASS
#' @export
#'
Null_model <- function(Y,C){


    null.fit = rq(Y~C, tau = -1)



  return(null.fit)
}
tianyingw/iQRAT documentation built on Aug. 22, 2022, 11:25 a.m.