jaredhuling / oem

Penalized least squares estimation using the Orthogonalizing EM (OEM) algorithm
http://jaredhuling.org/oem
25 stars 6 forks source link

Support observation weights #15

Open tomwenseleers opened 6 years ago

tomwenseleers commented 6 years ago

I noticed that observation weights are not yet supported - are these not simple to incorporate by noticing that weighted least squares minimizes sum( w (Y - X %% beta)^2 ) = sum_i( (sqrt(w[i]) X[i, ] %% beta - sqrt(w[i]) * Y[i])^2 ), meaning that one could simulate observation weights simply by multiplying both the design matrix X and the dependent variance Y by sqrt(weights) ?

jaredhuling commented 6 years ago

I haven't had the time to do this but will eventually. There are some tricky issues due to how I scale/standardize the design matrix

sehoff commented 1 year ago

I would like to know, if you plan to implement observation weights in the future, or if this isn`t planned anymore?

And, of course, thanks a lot for your package.