How do the 'weights' work in the glmfit function?
3 ビュー (過去 30 日間)
古いコメントを表示
I am working with the glmfit function. The current line of code is:
b = glmfit(X,y,'binomial','link','logit');
In certain cases, some data points in X are more important than others and I want to modify the log-likelihood with weights.
Lets say I have data points x1, x2, ... , x10. x1 is the least important and x10 is the most important, and it follows with a linear increasing order.
From the documentation (mathworks.com/help/stats/glmfit.html): "such as the inverses of the relative variance of each observation". That sentence suggests that the weights will be in units matching square of variables, so that would suggest (10:-1:1).^2' is what I am looking for. However, it could be that the help wasn't written well and (10:-1:1) is what I want. Which one is correct?
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!