run_best_subset_mc: Best subset multicore tuning.

View source: R/run_best_subset.R

run_best_subset_mcR Documentation

Best subset multicore tuning.

Description

run_best_subset_mc is called from within run_best_subset. It tunes using multiple cores.

Usage

run_best_subset_mc(
  y,
  L1.x,
  L2.x,
  L2.unit,
  L2.reg,
  loss.unit,
  loss.fun,
  data,
  cores,
  models,
  verbose
)

Arguments

y

Outcome variable. A character scalar containing the column name of the outcome variable in survey.

L1.x

Individual-level covariates. A character vector containing the column names of the individual-level variables in survey and census used to predict outcome y. Note that geographic unit is specified in argument L2.unit.

L2.x

Context-level covariates. A character vector containing the column names of the context-level variables in survey and census used to predict outcome y.

L2.unit

Geographic unit. A character scalar containing the column name of the geographic unit in survey and census at which outcomes should be aggregated.

L2.reg

Geographic region. A character scalar containing the column name of the geographic region in survey and census by which geographic units are grouped (L2.unit must be nested within L2.reg). Default is NULL.

loss.unit

Loss function unit. A character-valued scalar indicating whether performance loss should be evaluated at the level of individual respondents (individuals) or geographic units (L2 units). Default is individuals.

loss.fun

Loss function. A character-valued scalar indicating whether prediction loss should be measured by the mean squared error (MSE) or the mean absolute error (MAE). Default is MSE.

data

Data for cross-validation. A list of k data.frames, one for each fold to be used in k-fold cross-validation.

cores

The number of cores to be used. An integer indicating the number of processor cores used for parallel computing. Default is 1.

models

The models to perform best subset selection on. A list of model formulas.

verbose

Verbose output. A logical argument indicating whether or not verbose output should be printed. Default is TRUE.

Value

The cross-validation errors for all models. A list.

Examples

## Not run: 
# not yet

## End(Not run)

autoMrP documentation built on May 29, 2024, 6:40 a.m.