Defines functions screen_cpp

Documented in screen_cpp

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Sure Independence Screening in Step 2
#' @param x a n-by-p matrix of main effects, with i.i.d rows, and each row represents a vector of observations of p main-effects
#' @param y a vector of length n. In sprinter, y is the residual from step 1
#' @param num_keep the number of candidate interactions in Step 2. Default to be n / [log n]
#' @param square An indicator of whether squared effects should be considered in Step 1 (NOT Step 2!). square == TRUE if squared effects have been considered in Step 1, i.e., squared effects will NOT be considered in Step 2.
#' @param main_effect An indicator of whether main effects should also be screened. Default to be false. The functionality of main_effect = true is not used in sprinter, but for SIS_lasso.
#' @return an matrix of 2 columns, representing the index pair of the selected interactions. 
#' @export
screen_cpp <- function(x, y, num_keep, square = FALSE, main_effect = FALSE) {
    .Call('_sprintr_screen_cpp', PACKAGE = 'sprintr', x, y, num_keep, square, main_effect)

Try the sprintr package in your browser

Any scripts or data that you put into this service are public.

sprintr documentation built on Aug. 24, 2019, 5:03 p.m.