- •Table of Contents
- •Chapter 1. Introduction
- •Using Commands
- •Batch Program Use
- •How to Use this Manual
- •Chapter 2. Object and Command Basics
- •Object Declaration
- •Object Commands
- •Object Assignment
- •More on Object Declaration
- •Auxiliary Commands
- •Managing Workfiles and Databases
- •Managing Objects
- •Basic Command Summary
- •Chapter 3. Matrix Language
- •Declaring Matrices
- •Assigning Matrix Values
- •Copying Data Between Objects
- •Matrix Expressions
- •Matrix Commands and Functions
- •Matrix Views and Procs
- •Matrix Operations versus Loop Operations
- •Summary of Automatic Resizing of Matrix Objects
- •Matrix Function and Command Summary
- •Chapter 4. Working with Tables
- •Creating a Table
- •Assigning Table Values
- •Customizing Tables
- •Labeling Tables
- •Printing Tables
- •Exporting Tables to Files
- •Customizing Spreadsheet Views
- •Table Summary
- •Chapter 5. Working with Graphs
- •Creating a Graph
- •Changing Graph Types
- •Customizing a Graph
- •Labeling Graphs
- •Printing Graphs
- •Exporting Graphs to Files
- •Graph Summary
- •Chapter 6. EViews Programming
- •Program Basics
- •Simple Programs
- •Program Variables
- •Program Modes
- •Program Arguments
- •Control of Execution
- •Multiple Program Files
- •Subroutines
- •Programming Summary
- •Chapter 7. Strings and Dates
- •Strings
- •Dates
- •Appendix A. Object, View and Procedure Reference
- •Alpha
- •Coef
- •Equation
- •Graph
- •Group
- •Link
- •Logl
- •Matrix
- •Model
- •Pool
- •Rowvector
- •Sample
- •Scalar
- •Series
- •Sspace
- •System
- •Table
- •Text
- •Valmap
- •Vector
- •Appendix B. Command Reference
- •addassign
- •addinit
- •addtext
- •align
- •alpha
- •append
- •arch
- •archtest
- •area
- •arlm
- •arma
- •arroots
- •auto
- •axis
- •bdstest
- •binary
- •block
- •boxplot
- •boxplotby
- •bplabel
- •cause
- •ccopy
- •cdfplot
- •cellipse
- •censored
- •cfetch
- •chdir
- •checkderivs
- •chow
- •clabel
- •cleartext
- •close
- •coef
- •coefcov
- •coint
- •comment
- •control
- •copy
- •correl
- •correlsq
- •count
- •create
- •cross
- •data
- •datelabel
- •dates
- •dbcopy
- •dbcreate
- •dbdelete
- •dbopen
- •dbpack
- •dbrebuild
- •dbrename
- •dbrepair
- •decomp
- •define
- •delete
- •derivs
- •describe
- •displayname
- •draw
- •drawdefault
- •driconvert
- •drop
- •dtable
- •edftest
- •endog
- •equation
- •errbar
- •exclude
- •exit
- •expand
- •fetch
- •fill
- •fiml
- •fixedtest
- •forecast
- •freeze
- •freq
- •frml
- •garch
- •genr
- •grads
- •graph
- •group
- •hconvert
- •hfetch
- •hilo
- •hist
- •hlabel
- •impulse
- •jbera
- •kdensity
- •kerfit
- •label
- •laglen
- •legend
- •line
- •linefit
- •link
- •linkto
- •load
- •logit
- •logl
- •makecoint
- •makederivs
- •makeendog
- •makefilter
- •makegarch
- •makegrads
- •makegraph
- •makegroup
- •makelimits
- •makemap
- •makemodel
- •makeregs
- •makeresids
- •makesignals
- •makestates
- •makestats
- •makesystem
- •matrix
- •means
- •merge
- •metafile
- •model
- •name
- •nnfit
- •open
- •options
- •ordered
- •output
- •override
- •pageappend
- •pagecontract
- •pagecopy
- •pagecreate
- •pagedelete
- •pageload
- •pagerename
- •pagesave
- •pageselect
- •pagestack
- •pagestruct
- •pageunstack
- •param
- •pcomp
- •plot
- •pool
- •predict
- •probit
- •program
- •qqplot
- •qstats
- •range
- •ranhaus
- •read
- •rename
- •representations
- •resample
- •reset
- •residcor
- •residcov
- •resids
- •results
- •rndint
- •rndseed
- •rowvector
- •sample
- •save
- •scalar
- •scale
- •scat
- •scatmat
- •scenario
- •seas
- •seasplot
- •series
- •setbpelem
- •setcell
- •setcolwidth
- •setconvert
- •setelem
- •setfillcolor
- •setfont
- •setformat
- •setheight
- •setindent
- •setjust
- •setline
- •setlines
- •setmerge
- •settextcolor
- •setwidth
- •sheet
- •show
- •signalgraphs
- •smooth
- •smpl
- •solve
- •solveopt
- •sort
- •spec
- •spike
- •sspace
- •statby
- •stategraphs
- •statefinal
- •stateinit
- •stats
- •statusline
- •stom
- •stomna
- •store
- •structure
- •svar
- •system
- •table
- •template
- •testadd
- •testbtw
- •testby
- •testdrop
- •testexog
- •testfit
- •testlags
- •teststat
- •text
- •textdefault
- •trace
- •tramoseats
- •tsls
- •unlink
- •update
- •updatecoefs
- •uroot
- •usage
- •valmap
- •vars
- •vector
- •wald
- •wfcreate
- •wfopen
- •wfsave
- •wfselect
- •white
- •workfile
- •write
- •wtsls
- •xyline
- •xypair
- •Appendix C. Special Expression Reference
- •@expand
- •nrnd
- •Appendix D. Operator and Function Reference
- •Operators
- •Basic Mathematical Functions
- •Time Series Functions
- •Descriptive Statistics
- •By-Group Statistics
- •Special Functions
- •Trigonometric Functions
- •Statistical Distribution Functions
- •Appendix E. Workfile Functions
- •Basic Workfile Information
- •Dated Workfile Information
- •Panel Workfile Functions
- •Appendix F. String and Date Function Reference
- •@dateadd
- •@datediff
- •@datefloor
- •@datepart
- •@datestr
- •@dateval
- •@dtoo
- •@eqna
- •@insert
- •@instr
- •@isempty
- •@left
- •@len, @length
- •@lower
- •@ltrim
- •@makedate
- •@neqna
- •@otod
- •@replace
- •@right
- •@rtrim
- •@strdate
- •@strlen
- •@strnow
- •@trim
- •@upper
- •Appendix G. Matrix Reference
- •@cholesky
- •colplace
- •@columnextract
- •@columns
- •@cond
- •@convert
- •@eigenvalues
- •@eigenvectors
- •@explode
- •@filledmatrix
- •@filledrowvector
- •@filledsym
- •@filledvector
- •@getmaindiagonal
- •@identity
- •@implode
- •@inner
- •@inverse
- •@issingular
- •@kronecker
- •@makediagonal
- •matplace
- •mtos
- •@norm
- •@outer
- •@permute
- •@rank
- •@resample
- •@rowextract
- •rowplace
- •@rows
- •@solvesystem
- •stom
- •stomna
- •@subextract
- •@trace
- •@transpose
- •@unitvector
- •@vech
- •Appendix H. Programming Language Reference
- •call
- •@date
- •else
- •endif
- •endsub
- •@errorcount
- •@evpath
- •exitloop
- •include
- •@isobject
- •next
- •open
- •output
- •poff
- •program
- •return
- •statusline
- •step
- •stop
- •subroutine
- •@temppath
- •then
- •@time
- •wend
- •while
- •Index
- •Symbols
- •% (percent sign)
- •+ (plus)
- •addition 35
- •@crossid 593
- •@date 148, 590, 633
- •@eqna 124, 575, 599
- •@-functions
- •@inner 578, 619
- •@insert 126, 600
- •@instr 124, 600
- •@inverse 620
- •@isempty 124, 601
- •@isna 575
- •@isobject 637
- •@isperiod 591
- •@issingular 620
- •@kronecker 620
- •@kurtsby 580
- •@last 474
- •@lastmax 474
- •@lastmin 474
- •@left 125, 601, 606
- •@length 124, 602
- •@logit 583
- •@logx 576
- •@lower 127, 602
- •@ltrim 126, 602
- •@makedate 142, 603
- •@makediagonal 621
- •@maxsby 579
- •@meansby 579
- •@median 578
- •@mediansby 579
- •@minsby 579
- •@month 148, 591
- •@movav 576
- •@movsum 576
- •@nasby 580
- •@neqna 125, 575, 604
- •@ngroups 580
- •@norm 623
- •@obsby 579
- •@obsid 593
- •@obsnum 589
- •@obsrange 590
- •@obssmpl 590
- •@otod 128, 605
- •@outer 623
- •@pcha 577
- •@pchy 577
- •@permute 624
- •@quantile 579
- •@quantilesby 580
- •@quarter 148, 591
- •@rank 624
- •@recode 576
- •@replace 126, 605
- •@resample 625
- •@RGB specification of colors 454
- •@right 126
- •@round 576
- •@rowextract 625
- •@rows 626
- •@rtrim 126, 606
- •@seas 591
- •@skewsby 580
- •@solvesystem 626
- •@sqrt 576
- •@stdev 579
- •@stdevsby 579
- •@strdate 128, 148, 591, 607
- •@strlen 607
- •@strnow 128, 607
- •@subextract 628
- •@sumsby 579
- •@sumsq 579
- •@sumsqsby 579
- •@temppath 641
- •_ (continuation character) 84
- •Numerics
- •Add factor
- •align 203
- •views 154
- •Alpha series
- •append 205
- •ARCH
- •Arguments
- •in programs 98
- •ARMA
- •ASCII file
- •open as workfile 532
- •Autocorrelation
- •Autogressive error. See AR.
- •Autowrap text 83
- •Axis
- •rename label 371
- •axis 217
- •Beta
- •Binary
- •Binomial
- •customize 231
- •Breusch-Godfrey test
- •call 633
- •Cell
- •censored 238
- •Cholesky factor
- •Chow test 241
- •Close
- •Coefficient
- •See Coef.
- •update default coef vector 521
- •Cointegration
- •Color
- •Column
- •extract from matrix 612
- •stack matrix 630
- •Conditional standard deviation
- •Conditional variance
- •Control variable 88
- •Convert
- •date to observation number 599
- •matrix to sym 618
- •Coordinates
- •Copy
- •cross 260
- •matrix 259
- •Create
- •Cross section member
- •of squares 424
- •Data
- •Database
- •Date
- •Dates
- •current date and time 147
- •string representation 598
- •Declare
- •Delete
- •Derivatives
- •Directory
- •Distribution function
- •DRI database
- •fetch series 239
- •Drop
- •group series or cross-section from pool definition 281
- •Eigenvalues 615
- •Element
- •else 634
- •Error correction model
- •Errors
- •exclude 289
- •Exclude variables from model solution 289
- •Exit
- •Exponential
- •Export
- •matrix 41
- •Extract
- •row vector 625
- •Files
- •Fill
- •Filled
- •Fixed effects
- •For loop
- •Forecast
- •Freeze
- •frml 306
- •Full information maximum likelihood 296
- •GARCH
- •Gauss file 532
- •Gaussian distribution 586
- •Generalized autoregressive conditional heteroskedasticity
- •Generate series
- •Gompit models 222
- •Gradients
- •display 315
- •create 59
- •high-low-open-close 320
- •pie graph 406
- •XY graph 556
- •graph 316
- •greater than comparison 36
- •add series 198
- •group 317
- •Hausman test 413
- •hconvert 318
- •HTML
- •If statement 100
- •Include
- •Inverse of matrix 620
- •Jarque-Bera
- •Johansen cointegration test 245
- •Kernel
- •label 330
- •specify as range 643
- •Lagrange multiplier
- •Legend
- •line 334
- •Link object
- •Local
- •Logistic
- •logl 344
- •Loop
- •exit loop 108, 635
- •Lotus file
- •Matrix
- •resample rows from 625
- •matrix 366
- •Maximum 578
- •Median 578
- •Merge
- •Messages
- •model solution 371
- •Model 170
- •Models
- •block structure 223
- •solve 475
- •Multiplication operator (*) 35
- •Negative binomial
- •Number
- •evaluate a string 608
- •Numbers
- •converting from strings 124
- •store 16, 490
- •Open
- •database 266
- •Output
- •Output redirection 638
- •override 382
- •Override variables in model solution 382
- •Page
- •resize 399
- •Panel
- •Panel data
- •Percent change
- •Poisson
- •Pool 171
- •declare 408
- •delete identifiers 272
- •pool 408
- •portrait 8
- •probit 410
- •create 83
- •open 84
- •P-value functions 587
- •QQ-plot
- •Quantile function 579
- •Random effects
- •Random number
- •Read
- •Recode values 576
- •Regressors
- •Rename
- •Resample
- •Residuals
- •Results
- •return 639
- •height 50
- •Run program
- •multiple files 108
- •Sample
- •set current 474
- •Save
- •with kernel fit 329
- •scenario 438
- •seas 440
- •Second moment matrix 619
- •declare 442
- •formula 306
- •show 470
- •Signal variables
- •Singular matrix
- •test for 620
- •Smoothing
- •Solve
- •linear system 626
- •sort 478
- •Sspace
- •declare 482
- •procs 180
- •State space
- •State variables
- •display graphs of 484
- •Static forecast 297
- •insert string into 600
- •relational comparison 121
- •String variable 89
- •in for loop 104
- •return from 109, 639
- •Symmetric matrix
- •declare 497
- •Table 187
- •text color 54
- •Test
- •Chow 241
- •for ARCH 210
- •mean, median, variance equality 501
- •mean, median, variance equality by classification 502
- •Text file
- •Then 642
- •Time
- •current as string 607
- •trace 512
- •Trigonometric functions 583
- •Uniform distribution 587
- •Valmap 189
- •vector 529
- •Verbose mode 85
- •append contents of workfile page to current page 383
- •close 12
- •contract page 385
- •create 260
- •end date of observation interval 590
- •open existing 12, 532
- •period indicators 591
- •save 12, 540
- •stack page 396
- •Write
- •wtsls 547
- •xypair 561
|
|
|
Descriptive Statistics—577 |
|
|
|
|
|
|
|
|
|
|
|
|
@pc(x) |
one-period percentage change |
equals @pch(x)*100 |
|
|
|
(in percent) |
|
|
|
|
|
|
|
|
@pch(x) |
one-period percentage change |
( X − X( −1) ) ⁄ X( −1 ) |
|
|
|
(in decimal) |
|
|
|
|
|
|
|
|
@pca(x) |
one-period percentage |
equals @pcha(x)*100 |
|
|
|
change—annualized (in per- |
|
|
|
|
cent) |
|
|
|
|
|
|
|
|
@pcha(x) |
one-period percentage |
@pcha(x) |
|
|
|
change—annualized (in deci- |
||
|
|
= ( 1 + @pch( x) )n − 1 |
||
|
|
mal) |
||
|
|
|
|
|
|
|
|
where n is the lag associated |
|
|
|
|
with one-year (n = 4 ) for |
|
|
|
|
quarterly data, etc.). |
|
|
|
|
|
|
|
@pcy(x) |
one-year percentage change (in |
equals @pchy(x)*100 |
|
|
|
percent) |
|
|
|
|
|
|
|
|
@pchy(x) |
one-year percentage change (in |
( X − X( −n) ) ⁄ X( − n) , where |
|
|
|
decimal) |
n is the lag associated with one- |
|
|
|
|
year ( n = 12 ) for annual data, |
|
|
|
|
etc.). |
|
|
|
|
|
|
Descriptive Statistics
These functions compute descriptive statistics for a specified sample, excluding missing values if necessary. The default sample is the current workfile sample. If you are performing these computations on a series and placing the results into a series, you can specify a sample as the last argument of the descriptive statistic function, either as a string (in double quotes) or using the name of a sample object. For example:
series z = @mean(x, "1945m01 1979m12")
or
w = @var(y, s2)
where S2 is the name of a sample object and W and X are series. Note that you may not use a sample argument if the results are assigned into a matrix, vector, or scalar object. For example, the following assignment:
vector(2) a
series x
a(1) = @mean(x, "1945m01 1979m12")
578—Appendix D. Operator and Function Reference
is not valid since the target A(1) is a vector element. To perform this latter computation, you must explicitly set the global sample prior to performing the calculation performing the assignment:
smpl 1945:01 1979:12
a(1) = @mean(x)
To determine the number of observations available for a given series, use the @obs function. Note that where appropriate, EViews will perform casewise exclusion of data with missing values. For example, @cov(x,y) and @cor(x,y) will use only observations for which data on both X and Y are valid.
In the following table, arguments in square brackets [ ] are optional arguments:
•[s]: sample expression in double quotes or name of a sample object. The optional sample argument may only be used if the result is assigned to a series. For @quantile, you must provide the method option argument in order to include the optional sample argument.
If the desired sample expression contains the double quote character, it may be entered using the double quote as an escape character. Thus, if you wish to use the equivalent of,
smpl if name = "Smith"
in your @MEAN function, you should enter the sample condition as:
series y = @mean(x, "if name=""Smith""")
The pairs of double quotes in the sample expression are treated as a single double quote.
Function |
Name |
Description |
|
|
|
@cor(x,y[,s]) |
correlation |
the correlation between X and Y. |
|
|
|
@cov(x,y[,s]) |
covariance |
the covariance between X and Y. |
|
|
|
@inner(x,y[,s]) |
inner product |
the inner product of X and Y. |
|
|
|
@obs(x[,s]) |
number of observa- |
the number of non-missing obser- |
|
tions |
vations for X in the current sam- |
|
|
ple. |
|
|
|
@mean(x[,s]) |
mean |
average of the values in X. |
|
|
|
@median(x[,s]) |
median |
computes the median of the X |
|
|
(uses the average of middle two |
|
|
observations if the number of |
|
|
observations is even). |
|
|
|
@min(x[,s]) |
minimum |
minimum of the values in X. |
|
|
|
@max(x[,s]) |
maximum |
maximum of the values in X. |
|
|
|
|
|
|
By-Group Statistics—579 |
|
|
|
|
|
|
|
|
|
|
|
|
@quantile(x,q[,m,s]) |
quantile |
the q-th quantile of the series X. m |
|
|
|
|
is an optional integer argument for |
|
|
|
|
specifying the quantile method: 1 |
|
|
|
|
(rankit - default), 2 (ordinary), 3 |
|
|
|
|
(van der Waerden), 4 (Blom), 5 |
|
|
|
|
(Tukey). |
|
|
|
|
|
|
|
@stdev(x[,s]) |
standard deviation |
square root of the unbiased sam- |
|
|
|
|
ple variance (sum-of-squared |
|
|
|
|
residuals divided by n − 1 ). |
|
|
|
|
|
|
|
@sum(x[,s]) |
sum |
the sum of X. |
|
|
|
|
|
|
|
@sumsq(x[,s]) |
sum-of-squares |
sum of the squares of X. |
|
|
|
|
|
|
|
@var(x[,s]) |
variance |
variance of the values in X (divi- |
|
|
|
|
sion by n ). |
|
|
|
|
|
|
By-Group Statistics
The following “by group”-statistics are available in EViews. They may be used as part of a series expression statements to compute the statistic for subgroups, and to assign the value of the relevant statistic to each observation.
Function |
Description |
|
|
@obsby(arg1, arg2[, s]) |
Number of non-NA arg1 observations for each |
|
arg2 group. |
|
|
@sumsby(arg1, arg2[, s]) |
Sum of arg1 observations for each arg2 group. |
|
|
@meansby(arg1, arg2[, s]) |
Mean of arg1 observations for each arg2 group. |
|
|
@minsby(arg1, arg2[, s]) |
Minimum value of arg1 observations for each |
|
arg2 group. |
|
|
@maxsby(arg1, arg2[, s]) |
Maximum value of arg1 observations for each |
|
arg2 group. |
|
|
@mediansby(arg1, arg2[, s]) Median of arg1 observations for each arg2 |
|
|
group. |
|
|
@varsby(arg1, arg2[, s]) |
Variance of arg1 observations for each arg2 |
|
group. |
|
|
@stdevsby(arg1, arg2[, s]) |
Standard deviation of arg1 observations for each |
|
arg2 group. |
|
|
@sumsqsby(arg1, arg2[, s]) |
Sum of squares of arg1 observations for each |
|
arg2 group. |
|
|
580—Appendix D. Operator and Function Reference
@quantilesby(arg1, arg2, |
Quantiles of arg1 observations for each arg2 |
[, s]) |
group. |
|
|
@skewsby(arg1, arg2[, s]) |
Skewness of arg1 observations for each arg2 |
|
group. |
|
|
@kurtsby(arg1, arg2[, s]) |
Kurtosis of arg1 observations for each arg2 |
|
group. |
|
|
@nasby(arg1, arg2[, s]) |
Number of arg1 NA values for each arg2 group. |
|
|
With the exception of @QUANTILEBY, all of the functions take the form:
@STATBY(arg1, arg2[, s])
where @STATBY is one of the by-group function keyword names, arg1 is a series expression, arg2 is a numeric or alpha series expression identifying the subgroups, and s is an optional sample literal (a quoted sample expression) or a named sample. With the exception of @OBSBY, arg1 must be a numeric series.
By default, EViews will use the workfile sample when computing the descriptive statistics. You may provide the optional sample s as a literal (quoted) sample expression or a named sample.
The @QUANTILEBY function requires an additional argument for the quantile value that you wish to compute:
@QUANTILEBY(arg1, arg2, q[, s])
For example, to compute the first quartile, you should use the q value of .25.
There are two related functions of note, @GROUPID(arg[, smpl])
returns an integer indexing the group ID for each observation of the series or alpha expression arg, while:
@NGROUPS(arg[, smpl])
returns a scalar indicating the number of groups (distinct values) for the series or alpha expression arg.
Special Functions
EViews provides a number of special functions used in evaluating the properties of various statistical distributions or for returning special mathematical values such as Euler’s constant. For further details on special functions, see the extensive discussions in Temme (1996), Abramowitz and Stegun (1964), and Press, et al. (1992).
Special Functions—581
Function |
Description |
|
|
@beta(a,b) |
beta integral (Euler integral of the second kind): |
|
B( a, b) = ∫ |
1 |
t |
a − 1 |
( 1 − t) |
b − 1 |
dt |
|
|
Γ( a) Γ( b) |
||||||||||||||
|
0 |
|
|
|
|
= ----------------------- |
||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Γ( a + b) |
||||
|
for a, b > 0 . |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
@betainc(x,a,b) |
incomplete beta integral: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||
|
1 |
|
|
x |
|
a − 1 |
( 1 − t) |
b − 1 |
dt |
|
|
|
||||||||||||
|
|
|
------------------∫ |
0 |
t |
|
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
B( a, b) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
for 0 ≤ x ≤ 1 and a, b > 0 . |
|
|
|
|
|
|
|
|
|
|
|
|
|||||||||||
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||
@betaincder(x,a,b,s) |
derivative of the incomplete beta integral: |
|
|
|
||||||||||||||||||||
|
evaluates the derivatives of the incomplete beta integral |
|||||||||||||||||||||||
|
B( x, a, b) , where s is an integer from 1 to 9 corre- |
|||||||||||||||||||||||
|
sponding to the desired derivative: |
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||
|
|
|
|
|
|
|
|
|
|
∂B |
|
|
∂B |
|
|
∂B |
|
|||||||
|
|
|
|
|
|
|
|
|
|
------- |
|
|
------- |
|
|
------- |
|
|
||||||
|
|
|
|
|
|
|
|
|
|
∂x |
|
|
∂a |
|
|
|
∂b |
|
|
|
||||
|
|
1 2 3 |
|
= |
|
∂2B |
|
∂2B ∂2B |
|
|||||||||||||||
|
|
4 5 6 |
|
|
--------- |
------------- |
------------ |
|
||||||||||||||||
|
|
|
|
|
|
|
∂x2 |
∂x∂a ∂x∂b |
|
|||||||||||||||
|
|
7 8 9 |
|
|
|
|
∂2B |
|
∂2B |
|
∂2B |
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|||||||||||||
|
|
|
|
|
|
|
|
|
--------- |
------------ |
|
--------- |
|
|
||||||||||
|
|
|
|
|
|
|
|
|
|
∂a2 |
|
∂a∂b |
|
∂b2 |
|
|||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@betaincinv(p,a,b) |
inverse of the incomplete beta integral: returns an x |
|||||||||||||||||||||||
|
satisfying: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
1 |
|
∫ |
x |
t |
a − 1 |
( 1 − t) |
b − 1 |
dt |
|||||||||
|
p = ------------------ |
0 |
|
|
|
|
|
|||||||||||||||||
|
|
|
B |
( a, b) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
for 0 ≤ p ≤ 1 and a, b > 0 . |
|
|
|
|
|
|
|
|
|
|
|
|
|||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||||||||
@betalog(a,b) |
natural logarithm of the beta integral: |
|
|
|
|
|
|
|||||||||||||||||
|
log B( a, b) = log Γ( a) + log Γ( b) − log Γ( a + b ) . |
|||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
@binom(n,x) |
binomial coefficient: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||
|
|
|
|
|
n |
|
|
|
|
|
|
|
n! |
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
= ------------------------ |
|
|
|
|
|
|
|||||||||||
|
|
|
|
|
|
x |
|
|
|
x!( n |
− x)! |
|
|
|
|
|
|
for n and x positive integers, 0 ≤ x ≤ n .
582—Appendix D. Operator and Function Reference
@binomlog(n,x) |
natural logarithm of the binomial coefficient: |
||||||||||||||
|
log ( n!) − log ( x!) − log ( ( n − x)!) |
||||||||||||||
@cloglog(x) |
complementary log-log function: |
|
|
|
|
|
|
||||||||
|
log ( − log ( 1 − x) ) |
|
|
||||||||||||
|
See also @qextreme. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||
@digamma(x), @psi(x) |
first derivative of the log gamma function: |
||||||||||||||
|
dlog Γ( x) |
|
|
|
|
|
|
1 dΓ( x) |
|||||||
|
ψ( x) = ----------------------- |
= ----------- --------------- |
|||||||||||||
|
dx |
|
|
|
|
|
|
Γ( x) |
dx |
||||||
@erf(x) |
error function: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
erf( x) |
|
|
|
2 |
∫ |
x |
e |
−t2 |
dt |
|
||||
|
= ------ |
0 |
|
|
|
||||||||||
|
|
|
|
|
|
π |
|
|
|
|
|
|
|
|
|
|
for x ≥ 0 . |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||
@erfc(x) |
complementary error function: |
|
|
|
|
|
|
|
|
||||||
|
2 |
|
∞ |
e |
−t2 |
|
|
|
|
|
|
|
|
|
|
|
erfc( x) = -------∫ |
x |
|
dt = 1 − erf( x) . |
|||||||||||
|
π |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for x ≥ 0 . |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@gamma(x) |
(complete) gamma function: |
|
|
|
|
|
|
|
|
|
|
||||
|
Γ( x) = ∫∞ e−ttx − 1dt |
|
|||||||||||||
|
|
|
|
0 |
|
|
|
|
|
|
|
|
|
|
|
|
for x ≥ 0 . |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||||||||||
@gammader(x) |
first derivative of the gamma function: |
|
|||||||||||||
|
Γ′ ( x) = dΓ( x) ⁄ ( dx) |
|
|||||||||||||
|
Note: Euler’s constant, γ ≈ 0.5772 , may be evaluated |
||||||||||||||
|
as γ = −@gammader(1) . See also @digamma and |
||||||||||||||
|
@trigamma. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||
@gammainc(x,a) |
incomplete gamma function: |
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
1 |
|
|
x |
|
−t |
t |
a − 1 |
dt |
|||
|
G( x, a) = -----------∫ |
|
e |
|
|
|
|||||||||
|
|
|
Γ( a) |
|
0 |
|
|
|
|
|
|
for x ≥ 0 and a > 0 .