全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
6045 3
2016-09-08
我打了di Binomial(6,4,0.6),想求如出现概率为0.6的某随机现象,在六次独立重复试验中,出现4次及以上的概率,结果出现提示“Binomial not found”,我又改成输入di bnomial(6,4,0.6),还是一样,然后输入help Binomial也能找到Binomal的介绍,可就是使用不出来是怎么回事?该如何解决?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2016-9-8 17:31:38
你打错了(少一个 i,不可大写)
复制代码
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-9-8 17:39:55
查function

Title

    [D] functions -- Functions


Description

    This is a quick reference for the probability distributions and density functions.  For help on all functions, see [D] functions.


Probability distributions and density functions

    The probability distribution and density functions are organized under the following headings:

        Beta and noncentral beta distributions
        Binomial distribution
        Chi-squared and noncentral chi-squared distributions
        Dunnett's multiple range distribution
        F and noncentral F distributions
        Gamma distribution
        Hypergeometric distribution
        Negative binomial distribution
        Normal (Gaussian), log of the normal, and binormal distributions
        Poisson distribution
        Student's t and noncentral Student's t distributions
        Tukey's Studentized range distribution


Beta and noncentral beta distributions

    ibeta(a,b,x)
       Domain a:     1e-10 to 1e+17
       Domain b:     1e-10 to 1e+17
       Domain x:     -8e+307 to 8e+307
                     Interesting domain is 0 < x < 1
       Range:        0 to 1
       Description:  returns the cumulative beta distribution with shape parameters a and b
                     returns 0 if x < 0.
                     returns 1 if x > 1.

                     ibeta() returns the regularized incomplete beta function, also known as the incomplete beta function ratio.  The incomplete beta
                     function without regularization is given by
                     (gamma(a)*gamma(b)/gamma(a+b))*ibeta(a,b,x)
                     or, better when a or b might be large,
                     exp(lngamma(a)+lngamma(b)-lngamma(a+b))*ibeta(a,b,x).

                     Here is an example of the use of the regularized incomplete beta function.  Although Stata has a cumulative binomial function (see
                     binomial()), the probability that an event occurs k or fewer times in n trials, when the probability of one event is p, can be
                     evaluated as cond(k==n,1,1-ibeta(k+1,n-k,p)).  The reverse cumulative binomial (the probability that an event occurs k or more
                     times) can be evaluated as cond(k==0,1,ibeta(k,n-k+1,p)).

    betaden(a,b,x)
       Domain a:     1e-323 to 8e+307
       Domain b:     1e-323 to 8e+307
       Domain x:     -8e+307 to 8e+307
                     Interesting domain is 0 < x < 1
       Range:        0 to 8e+307
       Description:  returns the probability density of the beta distribution, where a and b are shape parameters.
                     returns 0 if x < 0 or x > 1.

    ibetatail(a,b,x)
       Domain a:     1e-10 to 1e+17
       Domain b:     1e-10 to 1e+17
       Domain x:     -8e+307 to 8e+307
                     Interesting domain is 0 < x < 1
       Range:        0 to 1
       Description:  returns the reverse cumulative (upper tail or survivor) beta distribution with shape parameters a and b.
                     returns 1 if x < 0.
                     returns 0 if x > 1.

                     ibetatail() is also known as the complement to the incomplete beta function (ratio).

    invibeta(a,b,p)
       Domain a:     1e-10 to 1e+17
       Domain b:     1e-10 to 1e+17
       Domain p:     0 to 1
       Range:        0 to 1
       Description:  returns the inverse cumulative beta distribution: if ibeta(a,b,x) = p, then invibeta(a,b,p) = x.

    invibetatail(a,b,p)
       Domain a:     1e-10 to 1e+17
       Domain b:     1e-10 to 1e+17
       Domain p:     0 to 1
       Range:        0 to 1
       Description:  returns the inverse reverse cumulative (upper tail or survivor) beta distribution: if ibetatail(a,b,x) = p, then invibetatail(a,b,p)
                         = x.

    nibeta(a,b,np,x)
       Domain a:     1e-323 to 8e+307
       Domain b:     1e-323 to 8e+307
       Domain np:    0 to 10,000
       Domain x:     -8e+307 to 8e+307
                     Interesting domain is 0 < x < 1
       Range:        0 to 1
       Description:  returns the cumulative noncentral beta distribution, where a and b are shape parameters, np is the noncentrality parameter, and x is
                         the value of a beta random variable.
                     returns 0 if x < 0.
                     returns 1 if x > 1.

                     nibeta(a,b,0,x) = ibeta(a,b,x), but ibeta() is the preferred function to use for the central beta distribution. nibeta() is computed
                     using an algorithm described in Johnson, Kotz, and Balakrishnan (1995).

    nbetaden(a,b,np,x)
       Domain a:     1e-323 to 8e+307
       Domain b:     1e-323 to 8e+307
       Domain np:    0 to 1,000
       Domain x:     -8e+307 to 8e+307
                     Interesting domain is 0 < x < 1
       Range:        0 to 8e+307
       Description:  returns the probability density function of the noncentral beta distribution, where a and b are shape parameters, np is the
                         noncentrality parameter, and x is the value of a beta random variable.
                     returns 0 if x < 0 or x > 1.

                     nbetaden(a,b,0,x)= betaden(a,b,x), but betaden() is the preferred function to use for the central beta distribution. nbetaden() is
                     computed using an algorithm described in Johnson, Kotz, and Balakrishnan (1995).

    invnibeta(a,b,np,p)
       Domain a:     1e-323 to 8e+307
       Domain b:     1e-323 to 8e+307
       Domain np:    0 to 1,000
       Domain p:     0 to 1
       Range:        0 to 1
       Description:  returns the inverse cumulative noncentral beta distribution: if nibeta(a,b,np,x) = p, then invnibeta(a,b,np,p) = x.


Binomial distribution

    binomial(n,k,p)
       Domain n:     0 to 1e+17
       Domain k:     -8e+307 to 8e+307
                     Interesting domain is 0 < k < n
       Domain p:     0 to 1
       Range:        0 to 1
       Description:  returns the probability of observing floor(k) or fewer successes in floor(n) trials when the probability of a success on one trial
                         is p.
                     returns 0 if k < 0.
                     returns 1 if k > n.

    binomialp(n,k,p)
       Domain n:     1 to 1e+6
       Domain k:     0 to n
       Domain p:     0 to 1
       Range:        0 to 1
       Description:  returns the probability of observing floor(k) successes in floor(n) trials when the probability of a success on one trial is p.

    binomialtail(n,k,p)
       Domain n:     0 to 1e+17
       Domain k:     -8e+307 to 8e+307
                     Interesting domain is 0 < k < n
       Domain p:     0 to 1
       Range:        0 to 1
       Description:  returns the probability of observing floor(k) or more successes in floor(n) trials when the probability of a success on one trial is
                         p.
                     returns 1 if k < 0.
                     returns 0 if k > n.

    invbinomial(n,k,p)
       Domain n:     1 to 1e+17
       Domain k:     0 to n - 1
       Domain p:     0 to 1 (exclusive)
       Range:        0 to 1
       Description:  returns the inverse of the cumulative binomial; that is, it returns the probability of success on one trial such that the
                         probability of observing floor(k) or fewer successes in floor(n) trials is p.

    invbinomialtail(n,k,p)
       Domain n:     1 to 1e+17
       Domain k:     1 to n
       Domain p:     0 to 1 (exclusive)
       Range:        0 to 1
       Description:  returns the inverse of the right cumulative binomial; that is, it returns the probability of success on one trial such that the
                         probability of observing floor(k) or more successes in floor(n) trials is p.


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-1-14 16:30:46

请问如何在stata里进行二项分布的检验啊?
就是来判断一下样本的分布是不是随机的
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群