mfasiolo / qgam

Additive quantile regression R package
http://mfasiolo.github.io/qgam/
30 stars 7 forks source link

Determining lambda under heteroscedasticity #19

Closed mfasiolo closed 6 years ago

mfasiolo commented 7 years ago

At the moment lambda = err sqrt(2pivarHat) / (2log(2)*exp(lsig[ii])) where varHat is a vector, under a variable scale model. The problem is that lsig is a scalar, while in the model it is actually a function of the covariates. Hence the error bound is incorrect.

The proper solution is that, under logFlss, varHat should be an input of the logFlss family. Then lambda is calculated internally, with vector-valued lsig. Importantly, the derivatives of the log-likelihood w.r.t. lsig must be corrected, because now changes in lsig cause changes in lambda, which in turn changes the log-lik.

mfasiolo commented 6 years ago

I guess this has been solved here 45290e00837356d74ede239114b974efdb56cd6a