Description Usage Arguments Details Value Functions Examples
turns loan level data to monthly distributions
1 2 3 | vardistr_amnt(data, var1, var2, weight, datedim, segmenter_level = 2, ...)
vardistr_perc(data, var1, var2, weight, datedim, segmenter_level = 2, ...)
|
data |
a monthly loan performance level data frame in standard data dictionary format |
var1 |
the main (first) variable by which you wish to show the monthly distribution. Must be a "string". When segmenter_level = 2 then the levels of this variable are spread across the data frame. If segmenter_variable is = 3 then the unique levels of this variable are in the first column of the resultant data frame. |
var2 |
Only used when segmenter_level = 3. The unique levels of this variable are then spread across the resultant data frame. |
weight |
either "NULL" or a weight variable such as "loan_amount" or "closingbalance". When "NULL" the weight is count of contracts. Note, must be entered as a "string". |
datedim |
the date field by which you wish to show the distribution. Usually "orig_month" or "fpd_month". "pointintime_month" is used when point in time distributions want to be done over time (book analysis). Must be entered as a "string". |
segmenter_level |
Default is = 2. Then only one level of segmentation (distribution over time) is done. If = 3 then two levels of segmentation are done, var1 being the main level and var 2 the sub-level. |
... |
parameters used in |
vardistr_perc
a data frame with unique datedim in first column. other columns are the various levels of the var parameter. There is also a Total variable that contains the total of the weight parameter.
vardistr_amnt
: This only returns the amounts in each var level and the Total
1 2 3 4 5 | f_vdp_test <- vardistr_perc(data = df, var1 = "country", weight = "net_advance",
datedim = "pointintime_month", segmenter_level = 2, use_period = TRUE, period = fpd_period)
x <- vardistr_perc(data = df, var1 = "disclosure",
weight = "net_advance", datedim = "pointintime_month", segmenter_level = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.