Ox AppendicesJurgen A. DoornikOx version 3.3, September 2003This document, October 4, 2002,cJ.A. Doornik, 2001–2003
2 Appendix A1 Extending Oxdependencies of oxexport.hjdsystem.h platform and compiler specific definesjdtypes.h basic types and constantsjdmatrix.h basic
92 Appendix A3 Modelbase and OxPackconst iPeriod2){ // cross-section: always select full samplem_iT1sel = 0;m_iT2sel = rows(m_mData) - 1;}BprobitEx::I
A3.5 An example 93// set sample sizem_cT = rows(m_mY);if (m_cT <= 2){ println("\n*** Error: only ", m_cT, " observations.");ret
94 Appendix A3 Modelbase and OxPackBuffering(0); // stop bufferingBuffering(10); // rewind text window to marker}/////////////////////////////////////
A3.5 An example 95{{ "BFGS method", 0, FALSE, 0}};}BprobitEx::SendMenu(const sMenu){if (sMenu == "ModelClass"){return{{ "&
96 Appendix A3 Modelbase and OxPack{// set model class, and activate model formulation dialogm_iModelClass = MC_COUNT;"OxPackDialog"("O
A3.5 An example 97}else if (sDialog == "OP_TEST_FORECAST"){return{ { "Predictions" },{ "Print predicted outcomes", CTL_C
98 Appendix A3 Modelbase and OxPack// process user actions for test menu dialogselse if (sDialog == "OP_TEST_GRAPHICS"){decl iplot = 0;// ca
A3.5 An example 99Modelbase::SaveOptions();}BprobitEx::GetModelSettings(){// process model settings from model recall// could be m_iModelClass specifi
Appendix A4Using OxGaussA4.1 IntroductionOx has the capability of running a wide range of Gauss1programs. Gauss code can becalled from Ox programs, or
A4.3 Running OxGauss programs from GiveWin 101Which produces the output:Ox version 3.00 (Windows) (C) J.A. Doornik, 1994-2001calling gaussfuncresult f
A1.2 Adding C/C++code: a simple dynamic link library 3• All functions have the same format:– OXCALL defines the calling convention;– rtn is the return
102 Appendix A4 Using OxGauss...samples/oxgauss/gaussfunc.hnamespace gauss{extern decl _g_base;gaussf
A4.6 Some large projects 103A4.6.1 DPD98 for GaussDownload and install DPD from www.ifs.org.uk/econometindex.shtml (for ex-ample in ox/packages/DPD98
104 Appendix A4 Using OxGaussA4.6.2 BACC2001Download BACC (for Bayesian Analysis, Computation, and Communica-tion) from www.econ.umn.edu/~bacc/bacc200
Appendix A5OxGauss Function Summaryabs(a);returns absolute value of aarccos(a);returns arccosine of aarcsin(a);returns arcsine of aarctan,arctan2see a
106 Appendix A5 OxGauss Function Summarycdfbeta(x,df1,df2);returns P (X ≤ x) for X ∼ Beta(a, b)cdfbvn(h,k,r);returns P (X ≤ h, Y ≤ k) for X, Y ∼ BV N(
107chdir s;keyword version of changedirchol(x);returns the Choleski decomposition of xcholdn(p,x);returns the Choleski decomposition of p’p-x’xcholsol
108 Appendix A5 OxGauss Function Summary{zr,zi} = cmtrans(xr,xi);returns result from complex transpose (not in complex mode)code(me,v);returns recoded
109create [complex] fh=fname using comfile;creates a filecrossprd(x,y);returns cross product of x,y (both 3 x m)crout(x);returns LU decomposition of x i
110 Appendix A5 OxGauss Function Summary{zr,zi}=dfft(xr,xi);returns the discrete FFT of (xr,xi){zr,zi}=dffti(xr,xi);returns the reverse discrete FFT o
111editm(mx);unsupportedeig(mx);returns the eigenvalues of a general matrixeigcg(mr,mi);unsupportedeigcg2(mr,mi);unsupportedeigch(mr,mi);unsupportedei
4 Appendix A1 Extending OxA1.2.1 Compiling threes.cThe threes.c file should compile without problems into a DLL file. Makefiles forthe Microsoft, Borland
112 Appendix A5 OxGauss Function Summaryetdays(vt1,vt2);returns the difference in days between two datesethsec(vt1,vt2);returns the difference in hund
113fgetst(ifileno,n);as fgets, but drops newline characterfgt(ma,mb);returns 1 if fuzzy-greater than, 0 otherwisefileinfo(fspec);unsupportedfiles(mx);uns
114 Appendix A5 OxGauss Function Summarygammaii(r,p);returns quantiles from the Gamma(p,r,1) (incomplete gamma function)gausset();resets the defaultsg
115indnv(what,where);returns the indices of the numeric values from what in whereint(x)see floorintgrat2(f,xl,gl);unsupportedintgrat3(f,xl,gl,hl);unsup
116 Appendix A5 OxGauss Function Summaryln(ma);returns the natural logarithm of alncdfbvn(x1,x2,r);returns ln(cdfbvn(...))lncdfbvn2(h,dh,k,dk,r);unsup
117loess(y,x);unsupportedlog(ma);returns the base 10 logarithm of a (use ln for natural logarithm!)lower(s);returns s in lower case (s can be a string
118 Appendix A5 OxGauss Function Summarymeanc(x);returns the mean of each column of x as a column vectormedian(ma);returns the median of each column o
119{...}=ols(dataset,depvar,indvars);unsupportedolsqr(y,x);returns estimated coefficients from regressing y on x{bhat,yhat,res}=olsqr2(y,x);returns est
120 Appendix A5 OxGauss Function Summaryreturns the polynomial coefficientspolymat(x,p);returns x^1 ~ ... ~ x^ppolymult(c1,c2);multiplies two polynomia
121QR decomposition without pivoting, returning Q’Y, R, and Pqtyrep(y,x,pvt);as qtyre (pvt is ignored)quantile(x,e);returns e’th quantiles of columns
A1.2 Adding C/C++code: a simple dynamic link library 5A1.2.1.5 Compilation on Unix platformsCurrent versions of Ox for Linux (on Intel machines), SunO
122 Appendix A5 OxGauss Function Summarysame as rfftrndbeta(r,c,a,b);returns r x c matrix with Beta(a,b) random numbersrndcon c;ignoredrndgam(r,c,alph
123scalerr(x);returns the error code embedded in the missing valuescalmiss(x);returns 1 if x is scalar and a missing valueschtoc(sch,trans);unsupporte
124 Appendix A5 OxGauss Function Summarysortc(x,c);returns x sorted by column csortcc(x,c);returns x sorted by column c, where x is a character matrix
125subscat(x,v,s);replaces values in x by s according to category vsubstute(x,v,s);replaces values in x by s according to logical values in vsumc(x);r
126 Appendix A5 OxGauss Function Summarysets or clears the trap valuetrapchk(m);returns the trap value masked by mtrimsame as trimrtrimr(x,top,bot);re
127returns a correlation matrix from moments m=x’x, first column of x must be 1’svcx(x);returns a correlation matrix from data matrix xvec(x);returns t
Appendix A6OxGauss Language ReferenceA6.1 Lexical conventionsA6.1.1 TokensThe first action of a compiler is to divide the source code into units it can
A6.3 Constants 129A6.2.1 KeywordsThe following keywords are reserved:∗3keyword: one ofand delete endp goto matrix stringbreak do eq gt ne untilcall el
130 Appendix A6 OxGauss Language Reference(not both). A hexadecimal double constant is written as 0vhhhhhhhhhhhhhhhh.Theformat used is an 8 byte IEEE
A6.4 Objects 131escape-sequence: one of\" double quote (") \’ single quote (’)\0 null character \\ backslash (\)\a or \g alert (bel) \b back
6 Appendix A1 Extending OxA1.2.3 Dynamic link library and search pathsNote that the operating system has to be able to find the DLL file. In the example
132 Appendix A6 OxGauss Language Referencetype: one offn, keyword, matrix, proc, stringfunction-type: one offn, keyword, procA character matrix is a m
A6.6 External declarations 133An Ox program consists of a sequence of external declarations. These either reservestorage for an object, or serve to in
134 Appendix A6 OxGauss Language Referencewithout explicit value and without dimensions, it will default to an int with value 0. Thetype of assignment
A6.6 External declarations 135a2 = 1; /* a2 may be changed *//* ... */retp(a2,b1);endp;}{x1, x2} = test2(2,3);The example shows that external function
136 Appendix A6 OxGauss Language Referenceproc(0)= genfunc(flist,x,i);local f;f = flist[i]; /* f holds ith function */local f:proc; /* indicate that i
A6.7 Statements 137Labels are the targets of goto statements (see §A6.7.5); labels are local to a functionand have separate name spaces (which means t
138 Appendix A6 OxGauss Language ReferenceThe do while statement excutes the statement-list as long as the test expression isnonzero (for a matrix: at
A6.7 Statements 139possible to rewrite the code such that no gotos are required. The target of a goto is alabel.A gosub is similar to a goto, with the
140 Appendix A6 OxGauss Language ReferenceTable A6.1 Options for print and format commands./type/mat options applies to matrix type/str options applie
A6.8 Expressions 141Table A6.2 OxGauss operator precedence.Category operators associativityprimary ident ident() constant ()postfix []’.’! left to righ
A1.3 Adding C/C++code: returning values in arguments 7static void OXCALLfnInvert(OxVALUE *rtn, OxVALUE *pv, int cArg){int r, signdet = 0; double logde
142 Appendix A6 OxGauss Language ReferenceTable A6.3 Result from dot operators.left a operator right b result computesint op int int a op bint/double
A6.8 Expressions 143Table A6.5 Result from operators involving an empty matrix as argument.operator either argument empty both arguments empty== FALSE
144 Appendix A6 OxGauss Language Referencemust either be scalars, or a range. A range has the form start-index : end-index.A space inside a parenthesi
A6.8 Expressions 145A6.8.5 Multiplicative expressionsThe operators .*., *, .*, * , /,and./ group left-to-right and require operands ofarithmetic type.
146 Appendix A6 OxGauss Language Reference./ dot-division operator. The same applies for dot-multiplication, but note that 2.0*m2and 2.0.*m2 give the
A6.8 Expressions 147extra column (~ )orrow(|) is pre/appended. If both operands are a matrix, the matricesare joined. Note that the dimensions need no
148 Appendix A6 OxGauss Language Referencewill always be executed. For example, in the expression func1() .&& func2() thesecond function is ca
A6.9 Preprocessing 149A6.8.16 Logical-AND expressionsLogical and (&& or and returns the integer 1 if both of its operands compare unequal to0,
150 Appendix A6 OxGauss Language ReferenceA6.9.1 File inclusionA line of the form#include "filename";will insert the contents of the specified
A6.9 Preprocessing 151A6.9.3 Constant definitionIf any text follows the defined constant, all matching occurrences of that text will bereplaced by the s
8 Appendix A1 Extending Oxstatic void OXCALLfnDecldl(OxVALUE *rtn, OxVALUE *pv, int cArg){int i, j, r; MATRIX md, ml;OxLibCheckSquareMatrix(pv, 0, 0);
Appendix A7Comparing Gauss and Ox syntaxA7.1 IntroductionThis chapter compares Gauss syntax with Ox. In the two column format, Gauss isdiscussed on th
A7.2 Comparison 153A7.2.4 TypesGauss primarily has a matrix type. Ox is implicitly typed, and has the fol-lowing types: integer, double, matrix,string
154 Appendix A7 Comparing Gauss and Ox syntaxA7.2.7 Declaration and constantsIn Gauss, a variable can be assigned avalue with a let or implicit let st
A7.2 Comparison 155A7.2.9 OperatorsThe following have a different symbol:Gauss Ox.*. **/= !=not !and &&or ||The following Gauss operators are
156 Appendix A7 Comparing Gauss and Ox syntaxA7.2.11 Conditional statementsif i == 1;/* statements */elseif i = 2;/* statements */else;/* statements *
A7.3 G2Ox 157A7.2.14 String manipulationGauss allows storing of strings in a ma-trix, and provides special operators tomanipulate matrices which consi
Appendix A8Random Number GeneratorsA8.1 Modified Park & Miller generatorThis random number generator is the modified Park and Miller generator (base
Appendix A8 Random Number Generators 159static unsigned int s_uiSeed2GM = GM_INIT_2;#define GM_MUL1 36969#define GM_MUL2 18000double DRanGM(void){ /*
ReferencesDoornik, J. A. and Ooms, M. (2001). Introduction to Ox. London: Timberlake Consultants Press.L’Ecuyer, P. (1999). Tables of maximally-equidi
A1.4 Calling Ox-coded functions from C 9static OxVALUE *s_pvOxFunc; /* Ox code function to call */static int myFunc(int cP, VECTOR vP, double *pdFunc,
Subject Index= 137""string constant 130’’character constant 129’ transpose 144() function call 141() parentheses 141*~ direct multiplication
SUBJECT INDEX 163#define 150, 151#definecs 150, 151Division 145DLL see Dynamic linkingdo until 137do while 137Dot-relational expressions 147Double con
164 SUBJECT INDEXModulo expressions 146Multiplicative expressions 145NaN (Not a Number) 130Newline character 130output 139OX3PATH environment variable
10 Appendix A1 Extending OxThe myFunc function is a wrapper which calls the Ox function:• Space for the arguments and the return value is required. Th
A1.5 Adding a user-friendly interface with Visual C++11print(vscore);}...
12 Appendix A1 Extending OxThe full example is in ox/samples/ranapp. The code uses Microsoft FoundationClass (MFC) and Microsoft Visual C++(version 6)
A1.5 Adding a user-friendly interface with Visual C++13// ... FnGetRanAppSettings listed below ...// replaces standard Ox exit function// ... part del
14 Appendix A1 Extending Oxsymbol defines it as having three constant arguments. The implementation islisted below.• OxMain compiles the code and retur
A1.5 Adding a user-friendly interface with Visual C++15...ox/dev/windows/ranapp/RanApp.ox#include <oxstd
16 Appendix A1 Extending Oxdlg.m_cAcf = OxInt(OxArray(pv, 2), 0);if (dlg.DoModal() == IDOK){OxInt(OxArray(pv, 0), 0) = dlg.m_cT;OxInt(OxArray(pv, 1),
A1.6 Adding a user-friendly interface with Visual Basic 17A simple example, ox\dev\windows\vb\oxtest.vbp, illustrates the issues. Ithas four buttons w
18 Appendix A1 Extending Ox• The first command changes the random number generator,which requires passinga string, and gets a random number.• The secon
A1.6 Adding a user-friendly interface with Visual Basic 19Private Sub Generate_Click()Dim Res As IntegerRes = FOxRun(giMainIP, "OnGenerate")
20 Appendix A1 Extending OxcT = dlg.mcTcN = dlg.mcNcLag = dlg.mcLagCall OxValSetInt(OxValGetArrayVal( _OxValGetVal(pv, 0), 0), cT)Call OxValSetInt(OxV
Appendix A2Exported Function SummaryA2.1 IntroductionThis chapter documents the Ox related functions which are exported from the Ox DLL.The low level
ContentsA1 Extending Ox 1A1.1 Introduction . . . . . ... 1A1.2 Adding C/C++code: a simple dynamic link library . . ... 2A1.2.1
22 Appendix A2 Exported Function SummaryA2.2 Ox function summaryFOxCallBack, FOxCallBackMemberbool FOxCallBack(OxVALUE *pvFunc, OxVALUE *rtn, OxVALUE
A2.2 Ox function summary 23bool FOxGetDataMember(OxVALUE *pvClass, const char *sMember,OxVALUE *rtn);pvClass in: the object from which to get a data m
24 Appendix A2 Exported Function SummaryiMainIP in: return value from OxMainsFunc in: name in Ox code of function to callReturn valueTRUE if the funct
A2.2 Ox function summary 25void OxFnDouble4(OxVALUE *rtn, OxVALUE *pv,double (OXCALL * fn4)(double,double,double,double) );void OXCALL OxFnDoubleInt(O
26 Appendix A2 Exported Function SummaryDescriptionOxDeleteObject deletes the object; this calls the destructor, and deallocates allmemory owned by th
A2.2 Ox function summary 27OxLibCheckMatrixSizevoid OxLibCheckMatrixSize(OxVALUE *pv, int iFirst, int iLast,int r, int c);pv in: array of values of an
28 Appendix A2 Exported Function SummaryDescriptionMakes pv of type OXARRAY and allocates an array of c OxVALUEsinthatOXARRAY.If pv is not received fr
A2.2 Ox function summary 29argc in: number of command line argumentsargv in: command line argument list (first is programname)sCommand in: command line
30 Appendix A2 Exported Function SummaryOxMessagevoid OxMessage(char *s);s in: text to printNo return value.DescriptionPrints a message.OxRunAbortvoid
A2.2 Ox function summary 31OxRunMainExitCallvoid OxRunMainExitCall(void (OXCALL * fn)(void));fn in: function to be called when Ox main finishesNo retur
vi CONTENTSOxPackGetData ... 77OxPackReadProfile... ... 78OxPackSetMarker ... 78OxPackS
32 Appendix A2 Exported Function SummaryReturn valueOxValGetArray array of OxVALUEsorNULL if not OXARRAYOxValGetArrayLen array length or 0 if not OXAR
A2.2 Ox function summary 33void OxValSetDouble(OxVALUE *pv, int dVal);void OxValSetInt(OxVALUE *pv, int iVal);void OxValSetNull(OxVALUE *pv);void OxVa
34 Appendix A2 Exported Function SummarySetOxExitvoid SetOxExit(void (OXCALL * pfnNewOxExit)(int) );pfnNewOxExit in: new exit handler functionNo retur
A2.2 Ox function summary 35SetOxMessagevoid SetOxMessage(void (OXCALL * pfnNewOxMessage)(char *) );pfnNewOxMessage in: new message handler functionNo
36 Appendix A2 Exported Function SummaryReturn valueA pointer to the text of the type name.SOxIntFuncchar * SOxIntFunc(void);Return valueA pointer to
A2.3 Macros to access OxVALUEs 37A2.3 Macros to access OxVALUEsThe OxVALUE is the container for all Ox types. It contains the type identifier, a rangeo
38 Appendix A2 Exported Function SummaryThe macros below provide easy access to these values. They all access an element inan array of OxVALUEs. None
A2.4 Ox-GiveWin function summary 39A2.4 Ox-GiveWin function summaryThis section documents the Ox related functions that are specific for use with GiveW
40 Appendix A2 Exported Function SummaryA2.5 Ox exported mathematics functionsA2.5.1 MATRIX and VECTOR typesThis section documents the C functions exp
A2.5 Ox exported mathematics functions 41printf("error: allocation failed!");MatZero(m, 3, 3); /* set m to 0 */MatZero(&v, 1, 3); /* set
CONTENTS viiA6 OxGauss Language Reference 128A6.1 Lexicalconventions... 128A6.1.1 Tokens... 128A6.1.2 Co
42 Appendix A2 Exported Function SummaryA2.5.2 Exported matrix functionsThe following list gives the exported C functions, with their Ox equivalent.ca
A2.5 Ox exported mathematics functions 43DProbMises probmisesDProbMVN probmvnDProbNormal probnDProbPoisson probpoissonDProbT probtDProbTNc probtDQuanB
44 Appendix A2 Exported Function SummaryFPeriodogram periodogramFPeriodogramAcfIDecQRt decqrIDecQRtEx decqrIDecQRtRank decqrIDecSVD decsvdIEigValPoly
A2.5 Ox exported mathematics functions 45MatBtBVec A=B-y; A’AMatBtB B’BMatBtSB B’SBMatCopyTransposeMatCopyVeccMatCopyVecrMatCopyMatDup A = BMatFreeBlo
46 Appendix A2 Exported Function SummaryVeccCopyMatVecrCopyMat
A2.5 Ox exported mathematics functions 47A2.5.3 Matrix function referencec abs, c div, c erf, c exp, c log, c mul, c sqrtdouble c_abs(double xr, doubl
48 Appendix A2 Exported Function Summarydouble DDensBeta(double x, double a, double b);double DDensChi(double x, double dDf);double DDensF(double x, d
A2.5 Ox exported mathematics functions 49DErf, DExpInt, DExpInte, DExpInt1double DErf(double x);double DExpInt(double x);double DExpInte(double x);dou
50 Appendix A2 Exported Function Summarydouble DProbBeta(double x, double a, double b);double DProbBVN(double dLo1, double dLo2, double dRho);double D
A2.5 Ox exported mathematics functions 51double DRanT(int iDf);double DRanU();Return valueReturns random numbers from various distributions.DRanU gene
viii CONTENTSA6.8.6 Additiveexpressions ... 146A6.8.7 Modulo expressions . . . ... 146A6.8.8 Concatenationexpressions ..
52 Appendix A2 Exported Function SummaryFCubicSplinebool FCubicSpline(VECTOR vY, VECTOR vT, int cT, double *pdAlpha,VECTOR vG, VECTOR vX, double *pdCV
A2.5 Ox exported mathematics functions 53DescriptionReturns TRUE if the argument is infinity (.Inf) or not-a-number (.NaN) respec-tively.FPeriodogram,
54 Appendix A2 Exported Function SummarymXt[cX][cT] in: X0data matrixout: householder vectors of QR decomposition of X,holds H in lower diagonal, and
A2.5 Ox exported mathematics functions 55Return value0: successk: if the k-th singular value (with index k - 1) has not been determined after50 iterat
56 Appendix A2 Exported Function SummaryReturn valueSee IEigen.DescriptionIEigenSym computes the eigenvalues of a symmetric matrix, and optionally the
A2.5 Ox exported mathematics functions 57mA[cA][cA] in: ptr to matrix to be invertedout: contains the inverse, if successfulpdLogDet out: the logarith
58 Appendix A2 Exported Function Summaryint ILUPdec(MATRIX mA, int cA, int *piPiv, double *pdLogDet,int *piSignDet, MATRIX mUt);mA[cA][cA] in: ptr to
A2.5 Ox exported mathematics functions 59mA[cM][cN] in: cM by cN matrix of rank cNout: unchangeddEps in: tolerance to usebAbsolute in: TRUE:usedEps, F
60 Appendix A2 Exported Function Summaryint IOlsNorm(MATRIX mXt, int cX, int cT, MATRIX mYt, int cY,MATRIX mB, MATRIX mXtXinv, MATRIX mXtX, bool fInRo
A2.5 Ox exported mathematics functions 61mXt[cX][cT] in: result from IDecQRtout: may have been overwrittenpiPiv[cX] in: pivots (output from IDecQRt)pc
CONTENTS ixA8 Random Number Generators 158A8.1 Modified Park & Miller generator . ... 158A8.2 Marsaglia’sgenerator...
62 Appendix A2 Exported Function SummaryLDLsolvevoid LDLsolve(MATRIX mL, VECTOR vD, VECTOR vX, VECTOR vB, int cA);mL[cA][cA] in: ptr to a matrix of wh
A2.5 Ox exported mathematics functions 63DescriptionSolves AX = B, with A = LU a square matrix. Normally, this will be precededby a call to ILUPdec. T
64 Appendix A2 Exported Function SummarymB[cB][cS] in: matrix BmBBt[cB][cB] out: matrix containing BB0MATRIX MatBSBt(MATRIX mB, int cB, MATRIX mS,int
A2.5 Ox exported mathematics functions 65MatCopy.. .MATRIX MatCopy(MATRIX mDest, MATRIX mSrc, int cM,int cN);MATRIX MatCopyTranspose(MATRIX mDestT, MA
66 Appendix A2 Exported Function SummaryReturn value!NULL: pointer to mRes indicating success;NULL: failure: not enough memory or couldn’t find all sin
A2.5 Ox exported mathematics functions 67MATRIX MatReflect(MATRIX mA, int cA);MATRIX MatTranspose(MATRIX mA, int cA);mA[cA][cA] in: matrixout: transpo
68 Appendix A2 Exported Function SummaryReturn valueReturns a pointer to mDest.RanDirichletvoid RanDirichlet(VECTOR vX, VECTOR vAlpha, int cAlpha);vX[
A2.5 Ox exported mathematics functions 69vU[cU] out: random valuesmX[cX][cX] out: random valuesSetFastMathvoid SetFastMath(bool fYes);fYes in: TRUE: s
70 Appendix A2 Exported Function SummaryvX[cT] in: vectorout: sorted vectormX[cT][.] in: matrixout: matrix with column iCol sorted (SortMatCol)mX[cT][
A2.5 Ox exported mathematics functions 71void VecrCopyMat(VECTOR vDest_r, MATRIX mSrc, int cM, int cN);void VeccCopyMat(VECTOR vDest_c, MATRIX mSrc, i
Appendix A3Modelbase and OxPackOxPack allows for interactive use of a Modelbase-derived class in cooperation withGiveWin. This can be achieved solely
73This brings up the Model Formulation dialog:OxPack calls SendVarStatus() in the package to determine the type of vari-ables available to build the m
74 Appendix A3 Modelbase and OxPack• Model/Model SettingsThe model settings determine the remaining model specification, here:OxPack obtains the conten
A3.1 OxPack exported functions 75A3.1 OxPack exported functionsNote that these function is only available when running via OxPack.The function names i
76 Appendix A3 Modelbase and OxPack{ "Student-t", CTL_CHECK, m_bStudent, "student"}}Possible values for the control type are:CTL L
OxPackGetData 77OxPackGetData"OxPackGetData"(const sType);"OxPackGetData"(const sType, const iVarType);"OxPackGetData"(c
78 Appendix A3 Modelbase and OxPackSee Modelbase::ReceiveModel() and Modelbase::ReceiveData() for anexample.OxPackReadProfile..."OxPackReadProfile
OxPackWriteProfile... 79OxPackWriteProfile..."OxPackWriteProfileInt"(const sKey, const sLabel, int iValue);"OxPackWriteProfileDouble&quo
80 Appendix A3 Modelbase and OxPackModelbase::IsCrossSectionvirtual IsCrossSection();Return valueReturns an integer:samplelags forecasts selection0: y
Modelbase::ReceiveData 81Modelbase::ReceiveDatavirtual ReceiveData();No return value.DescriptionCalled by OxPack as part of estimation, prior to Recei
Appendix A1Extending OxA1.1 IntroductionOx is an open system to which you can add functions written in other languages. Itis also possible to control
82 Appendix A3 Modelbase and OxPack• When a model class is selected from the Model menu.Modelbase::ReceiveModelvirtual ReceiveModel();DescriptionCalle
Modelbase::SendFunctions 83DescriptionCalled by OxPack to determine the dialog content for a menu action (not that theconventionisthat...afteramenuent
84 Appendix A3 Modelbase and OxPackReturn valueReturns an array of which each item is an array of two strings: menu commandtext, followed by the menu
Modelbase::SendMethods 85{{ "&1: Binary", "modelclass0", m_iModelClass == MC_BINARY},{ "&2: Count", "modelc
86 Appendix A3 Modelbase and OxPackModelbase::SendVarStatusvirtual SendVarStatus();Return valueReturns an array, where each item is an array defining t
Modelbase::SetModelSettings 87Table A3.1 Batch commands handled by OxPack.derived ...estimate("METHOD”=”OLS”,YEAR1=-1,PER1=0,YEAR2=-1,PER2=0,FORC
88 Appendix A3 Modelbase and OxPacktest("ar", 1, 2);this function is called asBatch("test", "ar", 1, 2);Note that batch
Modelbase::GetBatchModelSettings 89The call corresponds toBatchVarStatus("YZ", <1,4>);It is used, for example, by PcGive: when there i
90 Appendix A3 Modelbase and OxPack<a name="menu_test.2">Test Menu</a></h3><p><p><hr><h3><a nam
A3.5 An example 91<!--------------------------------- end -------------------------------></body></html>.......
Commentaires sur ces manuels