editPriority: Return a data.table with the priority that each unit has to...

Description Usage Arguments Value

View source: R/editPriority.R

Description

editPriority computes the priority for each unit in the input data set data. The corresponding model is applied to each unit, depending on the value of the regressand. The empirical distribution is used for every single value of the regressand, in order to assign a correct priority to units.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
editPriority(
  models,
  data,
  formula,
  targetVar,
  regressors,
  designWeight,
  id.vars,
  suffix = "_ed"
)

Arguments

models

A data.table with four colums named with the LHS variable of formula, fit.pi, fit.1 and fit.0. The first column contains every single value of this variable in the input data set data. The second, third and fourth columns contain a glm object with the fit of the model for each variable value.

data

data frame, list or environment (or object coercible by as.data.table to a data.table) containing the variables in the model (see 'Details').

formula

an object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted. The details of model specification are given under ‘Details’.

targetVar

name of the regressand (an object of class character).

regressors

an object of class character containing the names of regressors.

designWeight

an object of class character containing the design weight.

id.vars

names of the identification variables for each unit in the input data set data.

suffix

parameter for the name of the edited version of the variable under analysis.

Value

A data.table containing the following variables: id.vars, regressand, regressors, design weight, P01, moments, regressors and the priority to be analyzed.


david-salgado/categObsPredModelParam documentation built on Dec. 3, 2020, 1:42 p.m.