Approximating ratio of incomplete gamma functions

Discussion in 'Scientific Statistics Math' started by Paul, Dec 15, 2011.

  1. Paul

    Paul Guest

    Thanks to Mathematica, I have an expression for the mean of a right-
    truncated inverse chi-square distribution:

    Btrunc = TruncatedDistribution[{0, W/(B*(D - 1))},
    InverseChiSquareDistribution[D - 1]]; Mean[Btrunc]

    The expression is a ratio of two incomplete gamma functions --

    Gamma[1/2 (-3 + D), (B (-1 + D))/(
    2 W)]/(2 Gamma[1/2 (-1 + D), (B (-1 + D))/(2 W)])

    -- which is fine as long I stay in Mathematica. However, I will need
    to deploy this result in a statistics package, and two problems will
    arise:

    (1) Some statistics packages, such as SAS, have not implemented the
    incomplete gamma function.
    (2) Many programming languages are going to have trouble calculating
    the ratio of two very large numbers, which this is.

    So I wonder whether there's a simpler way to approximate the result.
    It may help that D is an integer of at least 5, and that W and B are
    positive. Many thanks for any suggestions.

    Best,
    Paul
     
    Paul, Dec 15, 2011
    #1
    1. Advertisements

  2. Paul

    R Guest

    Paul,

    Have you investigated the NLMIXED procedure in SAS which allows you to
    write your own likelihood function?

    Ryan
     
    R, Dec 16, 2011
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.