score_model_data: Model Deployment: Score model data.

score_model_dataR Documentation

Model Deployment: Score model data.

Description

Based on the models built, score the modeling base. Probability will be calculated, and the new segments will be generated based on the model scores. Segment has 3 levels. 0: prospects. 1: selected prospects. 2: users. Selected prospected is non users and whose model scores are high than the cutoff value.

Usage

score_model_data(model = model, newdata = newdata, ID = ID,
  cutoff = 0.5, file = file)

Arguments

model

The model generated by lrm_model.

newdata

The modeling data used to build the model.

ID

The ID variable in the data.

cutoff

The cutoff percent used to create the segment.

file

The file name to save the model probabilities and the segments.

Value

.

Examples


model.final.score <- score_model_data(model = model.final, newdata = ModelBase, ID = "BOOK_ID", cutoff = 0.1, file = "modelscores.xlsx") 


yangx227/SimmonsResearchR documentation built on April 24, 2022, 6:44 a.m.