Using Observation Weights / set WeightsVar

2 ビュー (過去 30 日間)
Aleksandar
Aleksandar 2021 年 12 月 25 日
回答済み: Michael 2024 年 7 月 29 日
In "Credit Scorecard Modeling Using Observation Weights" there is an example of using the weights, but it is not clear how to link column 'CustAge' with column 'Weight'?
If I set creditscorecard(data,'GoodLabel',0,'IDVar','CustID','ResponseVar','status','PredictorVars',{'CustAge','CustIncome'},'WeightsVar','Weight','BinMissingData',true) how can I know it is linked to variable 'CustAge'?
What if I have weights for more variables ('CustAge', 'CustIncome')? How will I link CustAge to its own Weight and CustIncome to its own Weight?

採用された回答

Michael
Michael 2024 年 7 月 29 日
Since the weights in this example are observation weights, they are not linked to any specific observation variable. Rather, they are linked to the individual observations. Since they are linked to the observations, there is only one weight for each row.
I've included a short script that computes the 'Goods' and 'Bads' for different variables without weights and with weights. It shows that the 'Good' and 'Bad' counts when aggregating different predictor bins are the same but that the 'Good' and 'Bad' counts change when you use weights.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics and Visualization についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by