How do the 'weights' work in the glmfit function?

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개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2016년 8월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by