computeEdEfficiency: Return a list with the global efficiency indicator and...

Description Usage Arguments Value Examples

View source: R/computeEdEfficiency.R

Description

computeEdEfficiency computes model fits for prior probabilities and the global efficiency indicator for a specific value of the regressand and a specific formula.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
computeEdEfficiency(
  data,
  targetValue,
  edEffIndicator,
  id.vars,
  varPriority,
  designWeight,
  globalIndicator,
  priorBin = 50,
  suffix
)

Arguments

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').

targetValue

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

edEffIndicator

efficiency indicator to evaluate the ordering given by the model

id.vars

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

varPriority

variable with the priority of the unit.

designWeight

an object of class character containing the design weight.

globalIndicator

indicator for all the data at once.

priorBin

number of units in which the data is divided to construct the mesh of points to calculate the efficiency indicator.

suffix

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

...

extra arguments to be used to form the default control argument.

Value

list with model fits for prior probabilities, description of the model to be fitted, value of the regressand and global efficiency indicator obtained for this specific value of the regressand.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
 fitPar <- new(Class = 'fitParam',
  edData = FFall_AS.StQ, rawData = FGall_AS.StQ, 
  selParam = list(ntreeTry=1000, stepFactor=2, improve=0.05, 
                  trace=TRUE, plot=TRUE, doBest = TRUE, 
                  ptrain = 0.8, DD = DDactu),
                  valParam = list(edEffInd = effInd, priorBin = 5, 
                  dataVal = c('Train','Test')))
                  
 ObsPredPar1 <- new(Class = 'categObsPredModelParam',
                  Data = FGall_AS.StQ,
                  VarRoles = list(Units = IDUnits,
                  Domains = character(0),
                  DesignW = DesignW,
                  Regressands = Regressands,
                  Regressors = Regressors
                  ))
                  
ObsPredPar1 <-  fitModels(ObsPredPar1, fitPar, na.as.category)
ObsPredPar1 <- computeVal(ObsPredPar1, fitPar, na.as.category)
# computeVal calls computeEdEfficiency calls (computeRunningEstim and effInd)

## End(Not run)

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