# Ox Function Summary

### date and time functions

`date` | returns a string with the current date
`dayofweek` | translates a date in the day of the week
`dayofcalendar` | translates a date in the day of the calender
`time` | returns a string with the current time
`timer` | returns an integer representing the current time
`timespan` | returns the lapsed time
`timestr` | returns a string from no of seconds since 1 Jan 1970
`timing` | returns date/time as no of seconds since 1 Jan 1970
`today` | returns current date/time as no of seconds since 1 Jan 1970

### general functions

`any` | returns TRUE if any element is TRUE
`arglist` | get the argument list specified on the command line
`binand` | binary and operation
`bincomp` | binary bit-wise complement operation
`binor` | binary or operation
`columns` | get number of columns of argument
`countc` | count elements in columns in specified intervals
`countr` | count elements in rows in specified intervals
`discretize` | count elements in columns in regularly-spaced intervals
`fuzziness` | set fuzziness parameter
`isdotfeq` | tests for dot fuzzy equality
`isdotinf` | returns boolean matrix from test for infinity
`isdotmissing` | returns boolean matrix from test for missing values (.NaN,+.Inf,-.Inf)
`isdotnan` | returns boolean matrix from test for .NaN
`iseq` | tests for equality with fuzziness 0
`isfeq` | tests for fuzzy equality
`ismissing` | tests for the presence of a missing value (.NaN,+.Inf,-.Inf)
`isnan` | tests for the presence of a .NaN
`limits` | maximum/maximum values in matrix plus location
`max` | maximum value in arguments
`min` | minimum value in arguments
`prodc` | compute column products
`prodr` | compute row products
`rows` | get number of rows of argument (0 for int,double)
`sizec` | get number of columns of argument (1 for int,double)
`sizeof` | same as `rows()`
`sizer` | get number of rows of argument (1 for int,double)
`sizerc` | get total number of elements of argument (1 for int,double)
`sumc` | compute column sums
`sumr` | compute row sums
`sumsqrc` | compute column sum of squares
`sumsqrr` | compute row sum of squares
`va_arglist` | needed to access arguments in a variable argument list

### graphics functions

`CloseDrawWindow` | Close the drawing window
`Draw` | draw a matrix against an x-axis
`DrawAcf` | draw an ACF (correlogram) and/or PACF
`DrawAdjust` | adjust most recent draw object
`DrawAxis` | draw an axis
`DrawAxisAuto` | draw an automatic axis
`DrawBoxPlot` | draw a box plot
`DrawCorrelogram` | draw a correlogram
`DrawDensity` | draw a histogram and/or density
`DrawHistogram` | draw a histogram from vector of heights
`DrawLegend` | draw the legend
`DrawLine` | draw a line
`DrawMatrix` | draw a matrix against an x-axis
`DrawPLine` | draw a line (pixel coordinates)
`DrawPSymbol` | draw a symbol (pixel coordinates)
`DrawPText` | draw text (pixel coordinates)
`DrawQQ` | draw a QQ plot
`DrawSpectrum` | draw a spectral density
`DrawSymbol` | draw a symbol
`DrawT` | draw a matrix against time
`DrawText` | draw text
`DrawTitle` | set the title text
`DrawTMatrix` | draw a matrix against time
`DrawX` | cross plot of a matrix against a vector
`DrawXMatrix` | cross plot of a matrix against a vector
`DrawXYZ` | draw 3-dimensional graph
`DrawZ` | add error bar/band/fan/Z variable
`SetDraw` | Set drawing defaults
`SaveDrawWindow` | Save the drawing to a file
`SetDrawWindow` | Set the name of the drawing window
`SetTextWindow` | Set the name of the text window
`ShowDrawWindow` | Show the drawing window

### input/output

`eprint` | print to stderr
`fclose` | close a file
`feof` | tests for end of file
`flush` | flushes the file buffer
`fopen` | open a file
`format` | set default print format
`fprint` | print to a file
`fprintln` | as `fprint()`, ensures the next output will be on a new line
`fread` | read data in binary format from a file
`fremove` | removes a file
`fscan` | read from a file
`fseek` | gets or repositions the file pointer
`fsize` | get the file size in bytes
`fwrite` | write data in binary format from a file
`loadmat` | load a matrix
`print` | print to stdout
`println` | as `print()`, ensures the next output will be on a new line
`savemat` | save a matrix
`scan` | read from the console
`sprint` | print to a string
`sprintbuffer` | resize the sprint buffer
`sscan` | read from a string

### is type functions

`isarray` | tests if argument is an array
`isclass` | tests if argument is a class object
`isdouble` | tests if argument is a double
`isfile` | tests if argument is a file
`isfunction` | tests if argument is a function
`isint` | tests if argument is an integer
`ismatrix` | tests if argument is a matrix
`isstring` | tests if argument is a string

### mathematical functions

`bessel` | bessel functions of order 0 and 1
`betafunc` | incomplete beta integral
`binomial` | binomial coefficient
`cabs` | complex absolute value
`cdiv` | complex division
`cerf` | complex error function
`cexp` | complex exponent
`ceil` | ceiling
`clog` | complex logarithm
`cmul` | complex multiplication
`csqrt` | complex square root
`dawson` | Dawson integral
`erf` | error function
`exp` | exponent
`expint` | exponential integral Ei
`fabs` | absolute value
`factorial` | factorial
`floor` | floor
`fmod` | floating point remainder
`gammafact` | gamma function (related to factorial)
`gammafunc` | incomplete gamma function
`idiv` | integer division
`imod` | integer remainder
`log` | natural logarithm
`log10` | base-10 logarithm
`loggamma` | logarithm of gamma function
`polygamma` | derivatives of loggamma function
`pow` | dot-power (alternative to `^ .^`)
`round` | rounds to nearest integer
`sqr` | square
`sqrt` | square root
`trunc` | truncate towards zero
`truncf` | fuzzy truncation towards zero

### matrix creation

`constant` | create a matrix and fill with a value
`diag` | create matrix with specified vector on diagonal
`ones` | create a matrix of ones
`range` | create a matrix consisting of a range of numbers (trend)
`toeplitz` | create a symmetric Toeplitz matrix
`unit` | create an identity matrix
`zeros` | create a matrix of zeros

### matrix decomposition

`choleski` | Choleski decomposition of symmetric positive definite matrix
`decldl` | square root free Choleski decomposition of sym.pd. matrix
`decldlband` | Choleski decomposition of sym.pd. band matrix
`declu` | LU decomposition
`decqr` | QR decomposition
`decqrmul` | applies Q from the QR decomposition to compute Q'Y
`decqrupdate` | update a QR decomposition via Givens rotations
`decschur` | real Schur decomposition
`decschurgen` | real generalized Schur decomposition
`decsvd` | singular value decomposition
`eigen` | eigenvalues of matrix
`eigensym` | eigenvalues of symmetric matrix
`eigensymgen` | solves generalized symmetric eigen problem
`polydiv` | divides two polynomials
`polymul` | multiplies two polynomials
`polymake` | gets polynomial coefficients from the (inverse) roots
`polyroots` | computes the (inverse) roots of a polynomial
`solveldl` | solves AX=B when A is decomposed with `decldl`
`solveldlband` | solves AX=B when A is decomposed with `decldlband`
`solvelu` | solves AX=B when A is decomposed with `declu`
`solvetoeplitz` | solves AX=B when A is symmetric Toeplitz

### matrix functions

`determinant` | returns the determinant of a matrix
`diagonalize` | set off-diagonal elements to zero
`invert` | invert a matrix
`inverteps` | sets inversion/rank epsilon
`invertgen` | (generalized) inversion
`invertsym` | invert a symmetric matrix
`logdet` | returns the log and sign of the determinant
`norm` | returns the norm of a matrix
`nullspace` | returns the null space of a matrix
`outer` | XSX' or diagonal(XSX') or Sum xixi'
`rank` | returns the rank of a matrix
`trace` | returns the trace of a matrix

### matrix modification/selection/reordering

`aggregatec` | aggregates the columns of a matrix by taking sums of groups
`aggregater` | aggregates the rows of a matrix by taking sums of groups
`deletec` | deletes columns with specific values (or missing values)
`deleteifc` | deletes columns according to boolean matrix
`deleteifr` | deletes rows according to boolean matrix
`deleter` | deletes rows with specific values (or missing values)
`diagcat` | concatenates two matrices long the diagonal
`diagonal` | extract diagonal from a matrix
`dropc` | deletes specified columns
`dropr` | deletes specified rows
`exclusion` | return sorted unique elements which are not in a 2nd matrix
`insertc` | inserts columns of zeros
`insertr` | inserts rows of zeros
`intersection` | return sorted unique intersection of two matrices
`lower` | return the lower diagonal of a matrix
`reflect` | reflect a matrix
`reshape` | reshape a matrix by row
`reversec` | reverse column elements
`reverser` | reverse row elements
`selectc` | selects columns with specific values (or missing values)
`selectifc` | selects columns according to boolean matrix
`selectifr` | selects rows according to boolean matrix
`selectr` | selects rows with specific values (or missing values)
`selectrc` | selects elements from specified rows and columns
`setbounds` | set the lower and upper bounds of a matrix
`setdiagonal` | set the diagonal of a matrix
`setlower` | set the lower diagonal of a matrix
`setupper` | set the upper diagonal of a matrix
`shape` | reshape a matrix by column
`sortbyc` | sort one column, and remaining columns accordingly
`sortbyr` | sort one row, and remaining rows accordingly
`sortc` | sort columns of a matrix, or an array of strings
`sortcindex` | sorted index from applying `sortc`
`sortr` | sort rows of a matrix
`submat` | extract a submatrix
`thinc` | thin the columns of a matrix
`thinr` | thin the rows of a matrix
`unique` | return the sorted unique elements of a matrix
`unvech` | undoes `vech`
`upper` | return the upper diagonal of a matrix
`vec` | vectorize the columns of a matrix
`vech` | vectorize the lower diagonal only
`vecindex` | row indices of non-zero elements of the vec of a matrix
`vecr` | vectorize the rows of a matrix
`vecrindex` | row indices of non-zero elements of the vecr of a matrix

### maximization and differentiation (Maximization package, requires `maximize.h`)

`GetMaxControl` | get maximum no of iterations and print control
`GetMaxControlEps` | get convergence tolerances
`MaxBFGS` | maximize a function using BFGS
`MaxControl` | set maximum no of iterations and print control
`MaxControlEps` | set convergence tolerances
`MaxConvergenceMsg` | get convergence message
`MaxNewton` | maximize a function using Newton's method
`MaxSimplex` | maximize a function using the simplex method
`MaxSQP` | maximize a function under nonlinear constraints
`MaxSQPF` | as MaxSQP, using feasible iterates
`Num1Derivative` | numerical computation of 1st derivative
`Num2Derivative` | numerical computation of 2nd derivative
`NumJacobian` | numerical computation of Jacobian matrix
`SolveNLE` | solves systems of nonlinear equations
`SolveQP` | solves quadratic programming problem

### probability

`denschi` | chi 2 density
`densf` | Fdensity
`densn` | standard normal density
`denst` | Student t-distribution density
`probchi` | chi 2 distribution function (also non-central)
`probf` | F-distribution function
`probn` | standard normal distribution function
`probt` | Student t distribution function
`quanchi` | chi 2 distribution quantiles
`quanf` | F-distribution quantiles
`quann` | standard normal quantiles
`quant` | Student t-distribution quantiles
`tailchi` | chi 2 distribution tail probabilities
`tailf` | F-distribution tail probabilities
`tailn` | standard normal tail probabilities
`tailt` | Student t-distribution tail probabilities

### probability (Probability package, requires `oxprob.h`)

`densbeta` | B(a,b) density
`densbinomial` | Binomial density
`denscauchy` | Cauchy density
`densexp` | exponential density
`densextremevalue` | Extreme Value density
`densgamma` | Gamma density
`densgeometric` | Geometric density
`densgh` | Generalized Hyperbolic density
`densgig` | Generalized Inverse Gaussion density
`denshypergeometric` | Hypergeometric density
`densinvgaussian` | Inverse Gaussion density
`denskernel` | kernel densities
`denslogarithmic` | Logarithmic density
`denslogistic` | Logistic density
`denslogn` | Lognormal density
`densmises` | von Mises density
`densnegbin` | Negative Binomial density
`denspareto` | Pareto density
`denspoisson` | Poisson density
`densweibull` | Weibull density
`probbeta` | B(a,b) cumulative distribution function
`probbinomial` | Binomial cumulative distribution function
`probbvn` | bivariate normal cumulative distribution function
`probcauchy` | Cauchy cumulative distribution function
`probexp` | exponential cumulative distribution function
`probextremevalue` | Extreme Value cumulative distribution function
`probgamma` | Gamma cumulative distribution function
`probgeometric` | Geometric cumulative distribution function
`probhypergeometric` | Hypergeometric cumulative distribution function
`probinvgaussian` | Inverse Gaussion cumulative distribution function
`problogarithmic` | Logarithmic cumulative distribution function
`problogistic` | Logistic cumulative distribution function
`problogn` | Lognormal cumulative distribution function
`probmises` | von Mises cumulative distribution function
`probmvn` | multivariate normal cumulative distribution function (up to trivariate)
`probnegbin` | Negative Binomial cumulative distribution function
`probpareto` | Pareto cumulative distribution function
`probpoisson` | Poisson cumulative distribution function
`probweibull` | Weibull cumulative distribution function
`quanbeta` | B(a,b) quantiles
`quanbinomial` | Binomial quantiles
`quancauchy` | Cauchy quantiles
`quanexp` | exponential quantiles
`quanextremevalue` | Extreme Value quantiles
`quangeometric` | Geometric quantiles
`quanhypergeometric` | Hypergeometric quantiles
`quaninvgaussian` | Inverse Gaussion quantiles
`quanlogarithmic` | Logarithmic quantiles
`quangamma` | Gamma quantiles
`quanlogistic` | Logistic quantiles
`quanlogn` | Lognormal quantiles
`quanmises` | von Mises quantiles
`quannegbin` | Negative Binomial quantiles
`quanpareto` | Pareto quantiles
`quanpoisson` | Poisson quantiles
`quanweibull` | Weibull quantiles

### random numbers

`rann` | standard normal distributed random numbers
`ranseed` | set and get seed, or choose random number generator
`ranu` | uniform [0,1] distributed random numbers

### random numbers (Probability package, requires `oxprob.h`)

`ranbeta` | B(a,b) distributed random numbers
`ranbinomial` | binomially distributed random numbers
`ranbrownianmotion` | realizations from a Brownian motion
`rancauchy` | Cauchy random numbers
`ranchi` | chi 2 distributed random numbers
`randirichlet` | Dirichlet(\alpha1,...,\alphac+1) distributed random numbers
`ranexp` | \exp(\lambda) distributed random numbers
`ranextremevalue` | Extreme Value random numbers
`ranf` | F-distributed random numbers
`rangamma` | gamma-distributed random numbers
`rangeometric` | Geometric random numbers
`rangh` | Generalized Hyperbolic random numbers
`rangig` | Generalized Inverse Gaussion random numbers
`ranhypergeometric` | Hypergeometric random numbers
`raninvgaussian` | inverse Gaussian-distributed random numbers
`ranlogarithmic` | logarithmic distributed random numbers
`ranlogistic` | logistic distributed random numbers
`ranlogn` | log-normal distributed random numbers
`ranmises` | von Mises distributed random numbers
`ranmultinomial` | multinomial distributed random numbers
`rannegbin` | negative binomial distributed random numbers
`ranpareto` | Pareto random numbers
`ranpoisson` | poisson distributed random numbers
`ranpoissonprocess` | realizations from a Poisson process
`ranshuffle` | samples from a vector without replacement
`ranstable` | stable-distributed random numbers
`ransubsample` | samples from a set of integers without replacement
`rant` | Student t-distributed random numbers
`ranuorder` | uniform order statistics
`ranweibull` | Weibull random numbers
`ranwishart` | Wishart(1, Ir) distributed random drawing

### statistics

`correlation` | correlation matrix of matrix (data in columns)
`meanc` | compute column means
`meanr` | compute row means
`moments` | compute column moment ratios (skewness,kurtosis, etc.)
`ols2c` | OLS based on normal equations (data in columns)
`ols2r` | OLS based on normal equations (data in rows)
`olsc` | OLS based on orthogonal decomposition (data in columns)
`olsr` | OLS based on orthogonal decomposition (data in rows)
`quantilec` | quantiles of a matrix (data in columns)
`quantiler` | quantiles of a matrix (data in rows)
`standardize` | standardize a matrix (data in columns)
`spline` | natural cubic spline smoother (data in columns)
`varc` | compute column variances
`variance` | variance matrix of matrix (data in columns)
`varr` | compute row variances

### string functions

`strfind` | finds a string/character in an array of strings/string
`strfindr` | as `strfind` but searching backward
`strifind` | case insensitive version of `strfind`
`strifindr` | case insensitive version of `strfindr`
`strlwr` | convert a string to lower case
`strtrim` | removes leading and trailing white space
`strupr` | convert a string to upper case

### time series (data in columns)

`acf` | autocorrelation function of matrix
`cumsum` | cumulate autoregressive sum
`cumprod` | cumulate autoregressive product
`cumulate` | cumulate (vector) autoregressive process
`dfft` | discrete Fourier transform
`diff0` | ith difference, (1-Li)y
`fft` | fast Fourier transform
`lag0` | ith lag
`periodogram` | periodogram, smoothed periodogram (spectral density)

### time series (Arma package, requires `arma.h`)

`arma0` | residuals of an ARMA(p,q) filter
`armaforc` | forecasts from an ARMA(p,q) process
`armagen` | fitted values of an ARMA(p,q) process
`armavar` | autocovariances of an ARMA(p,q) process
`diffpow` | dth fractional difference, (1-L)dy
`modelforc` | forecasts of a dynamic model
`pacf` | partial autocorrelation function of matrix
`pacf` | applies Choleski factor of a Toeplitz matrix

### system functions

`chdir` | change directory
`exit` | exits Ox
`getcwd` | get current working directory
`getenv` | get the value of an environment variable
`oxfilename` | returns the name of the Ox file it is called from
`oxprintlevel` | global control of printing
`oxrunerror` | raises a run-time error
`oxversion` | returns the Ox version
`oxwarning` | controls run-time warnings
`systemcall` | make an operating system call

### trigonometric functions

`acos` | arccosine
`asin` | arcsine
`atan` | arctangent
`atan2` | arctangent of x/y
`cos` | cosine
`cosh` | cosine hyperbolicus
`sin` | sine
`sinh` | sine hyperbolicus
`tan` | tangent
`tanh` | tangent hyperbolicus

### standard classes

Database class | data loading and saving, selection by name and sample
Modelbase class | Base for modelling packages
PcFiml class | system estimation. VARs, cointegration, simultaneous equations
PcFimlDgp class | generate data from a PcFiml DGP
PcNaiveDgp class | generate data from a PcNaive DGP
RanMC class | Error generation for Monte Carlo experiments
Sample class | sample period, base class for database
Simulation class | runs a Monte Carlo experiment

Ox version 3.40. This file last changed
. © JA Doornik
<Doornik home>