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

bootbca_pval.m when distribution is to the left of Zero #2

Open
steffejr opened this issue Mar 17, 2017 · 0 comments
Open

bootbca_pval.m when distribution is to the left of Zero #2

steffejr opened this issue Mar 17, 2017 · 0 comments

Comments

@steffejr
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant