model_list {autoMrP}R Documentation

A list of models for the best subset selection.

Description

model_list() generates an exhaustive list of lme4 model formulas from the individual level and context level variables as well as geographic unit variables to be iterated over in best subset selection.

Usage

model_list(y, L1.x, L2.x, L2.unit, L2.reg = NULL)

Arguments

y

Outcome variable. A character vector containing the column names of the outcome variable.

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.

Value

Returns a list with the number of elements equal to 2^k where k is the number context-level variables. Each element is of class formula.


[Package autoMrP version 0.98 Index]