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

include tvpack.jl with bivariate normal cdf #67

Merged
merged 3 commits into from
Feb 18, 2022
Merged

include tvpack.jl with bivariate normal cdf #67

merged 3 commits into from
Feb 18, 2022

Conversation

magerton
Copy link
Contributor

@magerton magerton commented Jan 29, 2019

This reincludes the tvpack.jl file with the bivariate normal CDF function. I've added a bvncdf(x,y,r) function that corresponds to the standard normal cdf Φ(x,y;ρ) where r=ρ. The function also handles Inf and -Inf arguments correctly now.

@magerton
Copy link
Contributor Author

magerton commented Jan 29, 2019

Addresses #43 and comment by @dmbates #36 (comment)

@magerton magerton changed the title add bvncdf tests add back tvpack.jl with bivariate normal cdf Jan 29, 2019
@magerton magerton changed the title add back tvpack.jl with bivariate normal cdf include tvpack.jl with bivariate normal cdf Jan 29, 2019
src/tvpack.jl Outdated Show resolved Hide resolved
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2022

Codecov Report

Merging #67 (40222d8) into master (28d732a) will increase coverage by 6.82%.
The diff coverage is 18.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   48.64%   55.47%   +6.82%     
==========================================
  Files          13       13              
  Lines         516      530      +14     
==========================================
+ Hits          251      294      +43     
+ Misses        265      236      -29     
Impacted Files Coverage Δ
src/tvpack.jl 16.34% <18.14%> (+16.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28d732a...40222d8. Read the comment docs.

@spaette
Copy link

spaette commented Mar 5, 2023

Possibly throw could be misspelled

$ tail -n 15 StatsFuns.jl/src/tvpack.jl
    # here we either have 0 or the marginal
    else
        if dh == typemax(T) || dk == typemax(T)
            return zero(T)
        elseif dh == typemin(T)
            return normcdf(-dk)
        elseif dk == typemin(T)
            return normcdf(-dh)
        else
            thow(error())
        end
    end
end

bvncdf(dh, dk, r) = bvnuppercdf(-dh, -dk, r)
$ 

magerton added a commit to magerton/StatsFuns.jl that referenced this pull request Mar 5, 2023
@magerton
Copy link
Contributor Author

magerton commented Mar 5, 2023

Possibly throw could be misspelled

$ tail -n 15 StatsFuns.jl/src/tvpack.jl
    # here we either have 0 or the marginal
    else
        if dh == typemax(T) || dk == typemax(T)
            return zero(T)
        elseif dh == typemin(T)
            return normcdf(-dk)
        elseif dk == typemin(T)
            return normcdf(-dh)
        else
            thow(error())
        end
    end
end

bvncdf(dh, dk, r) = bvnuppercdf(-dh, -dk, r)
$ 

Good catch, @spaette. Just submitted PR #160

andreasnoack pushed a commit that referenced this pull request Mar 6, 2023
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

Successfully merging this pull request may close these issues.

5 participants