predict_glmmLasso {autoMrP}R Documentation

Predicts on newdata from glmmLasso objects

Description

glmmLasso() predicts on newdata objects from a glmmLasso object.

Usage

predict_glmmLasso(census, m, L1.x, lasso.L2.x, L2.unit, L2.reg)

Arguments

census

Census data. A data.frame whose column names include L1.x, L2.x, L2.unit, if specified, L2.reg and pcs, and either bin.proportion or bin.size.

m

A glmmLasso() object.

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.

lasso.L2.x

Lasso context-level covariates. A character vector containing the column names of the context-level variables in survey and census to be used by the lasso classifier. If NULL and lasso is set to TRUE, then lasso uses the variables specified in L2.x. Default is NULL.

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 numeric vector of predictions from a glmmLasso() object.


[Package autoMrP version 0.98 Index]