MATLAB Weighted Multiple Regression -
i have set of data includes 821 observations, each 20 measurements. regress set data against set of single dependent variables using multiple linear regression in matlab. however, weight each observation differently in regression based on own calculations. example, give first observation weight of 1 , second observation weight of 1.6, ideally pull regression towards more heavily weighted second observation.
is such computation possible in matlab? if so, function(s) best carry out type of computation?
thanks help!
with statistics toolbox, can use fitlm
create linear regression model, applying weights
option supply weights.
nb in older versions of matlab, you'll need use linearmodel.fit
rather fitlm
, same thing.