Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Eviews5 / EViews5 / Docs / EViews 5 Command Ref.pdf
Скачиваний:
47
Добавлен:
23.03.2015
Размер:
5.23 Mб
Скачать

 

 

 

 

 

 

 

 

 

 

Trigonometric Functions—583

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

@gammaincder(x,a,n)

derivative of the incomplete gamma function:

 

 

 

Evaluates the derivatives of the incomplete gamma

 

 

 

integral G( x, a) , where n is an integer from 1 to 5

 

 

 

corresponding to the desired derivative:

 

 

 

 

 

 

 

 

 

 

 

 

 

∂G

∂G

 

 

-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-------

-------

 

 

 

 

 

 

 

 

1 2 -

=

 

 

∂x

∂a

 

 

 

 

 

 

 

 

 

 

 

2G

2G

 

2G

 

 

 

 

 

 

3 4 5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

---------

-------------

 

----------

 

 

 

 

 

 

 

 

 

 

 

 

∂x2

∂x∂a ∂a2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

@gammaincinv(p,a)

inverse of the incomplete gamma function: find the

 

 

value of x satisfying:

 

 

 

 

 

 

 

 

 

 

 

 

p = G(x, a)

 

 

1

x

t

t

a − 1

dt

 

 

 

= -----------

e

 

 

 

 

 

 

 

 

 

 

 

Γ( a)

0

 

 

 

 

 

 

 

 

for 0 ≤ p < 1 and a > 0 .

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

@gammalog(x)

logarithm of the gamma function: log Γ( x) . For deriva-

 

 

 

tives of this function see @digamma and @trigamma.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

@logit(x)

logistic transform:

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

ex

 

 

 

 

 

 

 

 

------------------ =

---------------

 

 

 

 

 

 

 

 

 

 

 

1 + e

x

1 + ex

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

@psi(x)

see @digamma.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

@trigamma(x)

second derivative of the log gamma function:

 

 

 

 

ψ′ ( x)

 

d2log Γ( x)

 

 

 

 

 

 

 

 

 

= -------------------------

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

dx2

 

 

 

 

 

 

Trigonometric Functions

When applied to a series, all of the trigonometric functions operate on every observation in the current sample and return a value for every observation. Where relevant, the input and results should/will be expressed in radians. All results are real valued—complex values will return NAs.

Function

Name

Examples/Description

 

 

 

@acos(x)

arc cosine (real results in radians)

@acos(-1) = π

@asin(x)

arc sine (real results in radians)

@asin(-1) = π ⁄ 2

 

 

 

@atan(x)

arc tangent (results in radians)

@atan(1) = π ⁄ 4

 

 

 

584—Appendix D. Operator and Function Reference

@cos(x)

cosine (argument in radians)

@cos(3.14159) ≈ −1

 

 

 

@sin(x)

sine (argument in radians)

@sin(3.14159) ≈ 0

@tan(x)

tangent (argument in radians)

@tan(1) ≈ 1.5574

 

 

 

Statistical Distribution Functions

The following functions provide access to the density or probability functions, cumulative distribution, quantile functions, and random number generators for a number of standard statistical distributions.

There are four functions associated with each distribution. The first character of each function name identifies the type of function:

Function Type

Beginning of Name

 

 

Cumulative distribution (CDF)

@c

 

 

Density or probability

@d

 

 

Quantile (inverse CDF)

@q

 

 

Random number generator

@r

 

 

The remainder of the function name identifies the distribution. For example, the functions for the beta distribution are @cbeta, @dbeta, @qbeta and @rbeta.

When used with series arguments, EViews will evaluate the function for each observation in the current sample. As with other functions, NA or invalid inputs will yield NA values. For values outside of the support, the functions will return zero.

Note that the CDFs are assumed to be right-continuous: FX( k ) = Pr( X k ) . The quantile functions will return the smallest value where the CDF evaluated at the value equals or exceeds the probability of interest: qX( p) = q , where FX( q ) ≥ p . The inequalities are only relevant for discrete distributions.

The information provided below should be sufficient to identify the meaning of the parameters for each distribution. For further details, see the Command and Programming Reference.

\

Distribution

Functions

Density/Probability Function

 

 

 

 

Beta

@cbeta(x,a,b),

f( x, a, b) =

xa − 1( 1 − x)b − 1

 

@dbeta(x,a,b),

--------------------------------------B( a, b)

 

@qbeta(p,a,b),

 

 

for 0 ≤ p ≤ 1 and for a, b > 0 , where B is

 

@rbeta(a,b)

the @beta function.

Statistical Distribution Functions—585

Binomial

@cbinom(x,n,p),

Pr( x, n, p)

n

x

( 1 −

p)

n x

 

@dbinom(x,n,p),

= p

 

 

 

 

 

 

 

 

x

 

 

 

 

 

 

 

 

 

@qbinom(s,n,p),

if x = 0, 1, …, n, … , and 0 otherwise, for

 

@rbinom(n,p)

 

0 ≤ p ≤ 1 .

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bivariate Normal

@cbvnorm(x,y,r),

 

 

 

1

 

 

 

 

 

 

@dbivnorm(x,y,r)

f( x, y, r )

 

 

 

 

 

 

 

= -------------------------

 

 

 

 

 

 

 

2π( 1 − r2)

 

 

 

 

 

 

( x2 + y2

2rxy )

 

 

 

 

 

exp

------------------------------------------

 

 

 

 

 

 

 

2( 1 − r2)

 

 

 

 

 

 

 

for −1 < r < 1 .

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Chi-square

@cchisq(x,v),

 

 

1

 

 

 

v ⁄ 2 − 1

e

x ⁄ 2

 

@dchisq(x,v),

f( x, v ) = ----------------------------x

 

 

 

 

 

 

2v

⁄ 2Γ( v ⁄ 2)

 

 

 

 

 

 

 

 

@qchisq(p,v),

where x ≥ 0 , and v > 0 . Note that the

 

@rchisq(v)

 

 

degrees of freedom parameter v need not be

 

 

an integer.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Exponential

@cexp(x,m),

 

 

1

 

 

x m

 

 

 

 

@dexp(x,m),

f( x, m ) = ----e

 

 

 

 

 

 

 

 

 

m

 

 

 

 

 

 

 

 

@qexp(p,m),

 

 

 

 

 

 

 

 

 

 

for x ≥ 0 , and m > 0 .

 

 

 

 

 

 

 

 

 

@rexp(m)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Extreme Value

@cextreme(x),

f( x) = exp ( x ex)

 

 

 

(Type I-minimum)

@dextreme(x),

for −∞ < x < ∞ .

 

 

 

 

 

 

 

 

 

 

@qextreme(p),

 

 

 

 

 

 

 

 

 

 

@cloglog(p),

 

 

 

 

 

 

 

 

 

 

 

 

@rextreme

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F-distribution

@cfdist(x,v1,v2),

f( x, v1, v2)

v1v1 2v2v2 2

 

 

 

 

@dfdist(x,v1,v2),

= ------------------------------------

 

@qfdist(p,v1,v2),

 

 

B ( v1

 

2, v2 ⁄ 2)

 

@rfdist(v1,v1)

x(v1 2) ⁄ 2( v2 + v1x)−(v1 + v2 ) ⁄ 2

 

 

 

 

 

 

where x ≥ 0 , and v1, v2 > 0 . Note that the

 

 

functions allow for fractional degrees of free-

 

 

dom parameters v1 and v2 .

 

 

 

 

 

Gamma

@cgamma(x,b,r),

f( x, b, r ) =

brxr − 1ex b Γ( r )

 

@dgamma(x,b,r),

where x ≥ 0 , and b, r > 0 .

 

 

 

 

 

 

 

 

@qgamma(p,b,r),

 

 

 

 

 

 

 

@rgamma(b,r)

586—Appendix D. Operator and Function Reference

Generalized Error @cged(x,r),

 

3 1

⁄ 2

 

 

 

 

 

 

3

 

r ⁄ 2

@dged(x,r),

--

 

 

 

 

Γ

--

 

 

r

 

 

 

 

r

 

r

 

 

@qged(p,r),

f( x, r ) = ----------------------

exp

x

 

------------

 

@rged(r)

2Γ

1

3

⁄ 2

 

 

 

 

Γ

 

1

 

 

--

 

 

 

 

 

 

--

 

 

 

 

r

 

 

 

 

 

r

 

 

where −∞ < x < ∞ , and r > 0 .

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Laplace

@claplace(x),

 

1

 

x

 

 

 

 

 

 

 

 

 

 

 

 

 

 

@dlaplace(x),

f( x) = --e

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

@qlaplace(x),

for −∞ < x < ∞ .

 

 

 

 

 

 

 

 

 

 

 

 

@rlaplace

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Logistic

@clogistic(x),

f( x) =

1

 

 

 

 

 

ex

 

 

 

 

@dlogistic(x),

------------------ = ---------------

 

 

 

@qlogistic(p),

 

1 + ex

 

 

 

 

 

1 + ex

 

 

 

@rlogistic

for −∞ < x < ∞ .

 

 

 

 

 

 

 

 

 

 

 

Log-normal

@clognorm(x,m,s),

f( x, m, s ) =

1

 

−(logx m)2

⁄ (2s2 )

 

@dlognorm(x,m,s),

-------------------e

 

 

 

 

 

 

 

 

 

 

 

x 2πs2

 

 

 

 

 

 

 

 

 

 

 

@qlognorm(p,m,s),

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

@rlognorm(m,s)

x > 0 , −∞ < m < ∞ , and s > 0 .

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Negative Binomial

@cnegbin(x,n,p),

Pr( x, n, p) =

Γ( x + n)

n

( 1

p)

x

 

@dnegbin(x,n,p),

-----------------------------------p

 

 

 

 

Γ( x + 1)

Γ( n)

 

 

 

 

 

@qnegbin(s,n,p),

if x = 0, 1, …, n, … , and 0 otherwise, for

 

@rnegbin(n,p)

 

0 ≤ x ≤ 1 .

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Normal

@cnorm(x),

 

 

 

2

 

 

 

 

f( x) = ( 2π)−1 ⁄ 2ex ⁄ 2

 

 

 

(Gaussian)

@dnorm(x),

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

@qnorm(p),

for −∞ < x < ∞ .

 

 

 

 

 

 

 

 

 

 

 

 

@rnorm, nrnd

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Poisson

@cpoisson(x,m),

Pr( x, m) = mxem x!

 

 

 

 

@dpoisson(x,m),

if x = 0, 1, …, n, … , and 0 otherwise, for

 

@qpoisson(p,m),

 

@rpoisson(m)

m > 0 .

 

 

 

 

 

 

 

 

 

 

 

Pareto

@cpareto(x,a,k),

f( x, a, k ) = ( aka) ⁄ xa + 1

 

 

 

@dpareto(x,a,k),

for a > 0 , and 0 ≤ k x .

 

 

 

 

 

 

 

 

 

 

 

@qpareto(p,a,k),

 

 

 

 

 

 

 

 

 

 

@rpareto(a,k)

Statistical Distribution Functions—587

Student's

@ctdist(x,v),

Γ

v + 1

 

 

 

−(v + 1)

t-distribution

@dtdist(x,v),

 

------------

 

 

x2

---------------------

 

 

2

 

1 +

2

 

@qtdist(p,v),

f( x, v) = --------------------------

-----

 

 

 

 

 

 

1

 

 

 

 

v

 

 

 

@rtdist(v)

 

 

 

--

 

v

 

 

 

 

( )

2

Γ

 

 

 

 

 

 

 

--

 

 

 

 

 

 

 

 

 

 

 

2

 

 

 

 

 

 

for −∞ < x < ∞ , and v > 0 . Note that

 

 

v = 1 , yields the Cauchy distribution.

 

 

 

 

 

 

 

 

 

 

 

 

 

Uniform

@cunif(x,a,b),

f( x)

 

 

1

 

 

 

 

@dunif(x,a,b),

= -----------

 

 

 

 

 

 

 

 

 

 

b

a

 

 

 

 

@qunif(p,a,b),

for a < x < b and b > a .

 

 

 

 

 

@runif(a,b), rnd

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Weibull

@cweib(x,m,a),

f( x, m, a) = amaxa − 1e−(x m)

 

 

 

 

 

 

 

 

 

 

 

 

a

 

@dweib(x,m,a),

 

 

 

 

 

 

 

 

 

 

 

 

@qweib(p,m,a),

where −∞ < x < ∞ , and m, a > 0 .

 

 

@rweib(m,a)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Additional Distribution Related Functions

The following utility functions were designed to facilitate the computation of p-values for common statistical tests. While these results may be derived using the distributional functions above, they are retained for convenience and backward compatibility.

Function

Distribution

Description

 

 

 

@chisq(x,v)

Chi-square

Returns the probability that a Chi-squared

 

 

statistic with v degrees of freedom exceeds

 

 

x :

 

 

@chisq(x,v)=1–@cchisq(x,d)

 

 

 

@fdist(x,v1,v2)

F-distribution

Probability that an F-statistic with v1

 

 

numerator degrees of freedom and v2

 

 

denominator degrees of freedom exceeds

 

 

x :

 

 

@fdist(x,v1,v2)=1–@cfdist(x,v1,v2)

 

 

 

@tdist(x,v)

t-distribution

Probability that a t-statistic with v degrees

 

 

of freedom exceeds x in absolute value

 

 

(two-sided p-value):

 

 

@tdist(x,v)=2*(1–@ctdist(x,v))

 

 

 

of the User’s Guide

588—Appendix D. Operator and Function Reference

Соседние файлы в папке Docs