Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsYout is not taken into account in VBA_Iphi #19

Closed
lionel-rigoux opened this issue Jul 19, 2016 · 2 comments
Closed

IsYout is not taken into account in VBA_Iphi #19

lionel-rigoux opened this issue Jul 19, 2016 · 2 comments
Labels

Comments

@lionel-rigoux
Copy link
Member

The computation og the error term dy2 in VBA_Iphi does not exclude the points that should be excluded according to isYout. This causes bugs when NaNs are present in the data and, more problematically, can silently bias the inference.
VBA_Iphi_extended does not have the problem.

@jdaunize
Copy link
Contributor

Lionel,

Normally, there is a bit of code in VBA_check that ensures that the data precision matrices priors.iQy{t} are zeroed at the corresponding data points:

% ensure excluded data consistency
if ~options.binomial
for t=1:dim.n_t
diQ = diag(priors.iQy{t})._~options.isYout(:,t);
options.isYout(:,t) = ~diQ;
priors.iQy{t} = diag(diQ)_priors.iQy{t}*diag(diQ);
end
end

In turn, this ensures that dy2 is removing the excluded data points (cf., in VBA_IPhi):
dy2 = dy2 + dy(:,t)'_iQy{t}_dy(:,t);

Are you sure of what you are saying?
Jean.

@lionel-rigoux
Copy link
Member Author

lionel-rigoux commented Jul 19, 2016

The problem is that 0*NaN gives a NaN, so if the data are effectively excluded, a NaN in the data will generate a nan dy2 even if it is excluded according to isYout.
So I retract my dramatic statement about potential silent problems, but I am sure that NaNs break the inversion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants