You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this function in my own code and found that it was not giving the correct Z values at times. I narrowed down the problem to situations when the effect is negative.
I changed my version of this function to do the following:
% adjust for acceleration
Z_1 = (ZPCTlower.*(1-acc.*zh0)-zh0)./(1+acc.ZPCTlower);
Z_2 = (ZPCTupper.(1-acc.*zh0)-zh0)./(1+acc.*ZPCTupper);
% which tail are we in?
% If there is more of the distribution to the left of zero, then we
% are in the lower tail
if PCTlower < PCTupper
Z = Z_2;
else
% otherwise we are in the other tail
Z = -Z_1;
end
The text was updated successfully, but these errors were encountered:
I am using this function in my own code and found that it was not giving the correct Z values at times. I narrowed down the problem to situations when the effect is negative.
I changed my version of this function to do the following:
% adjust for acceleration
Z_1 = (ZPCTlower.*(1-acc.*zh0)-zh0)./(1+acc.ZPCTlower);
Z_2 = (ZPCTupper.(1-acc.*zh0)-zh0)./(1+acc.*ZPCTupper);
The text was updated successfully, but these errors were encountered: