|
ClockTypeLabels |
static const |
parallel array of labels for the built-in clock types. |
exogoffs |
static |
\(\eta\) and \(\epsilon\) subspaces. |
Fgamma |
static |
2-dimensiona array pointing to \(\Gamma\), [r,f]. |
Gamma |
static |
\(\Gamma\): array (list) of groups of fixed and random effects,
\(\gamma\). |
groupoffs |
static |
\(\Gamma\) related subspaces. |
ilistnames |
static const |
|
maskoffs |
static |
|
NDPlabels |
const |
|
Theta |
static |
\(\Theta\): array (list) of endogenous states \(\theta\). |
thetaoffs |
static |
\(\theta\) tracking or iterating indices. |
|
ReverseState |
|
Recreate a State vector from an index and offset vector. |
|
ClockTypes |
|
Send one of these tags as first argument to SetClock() to use that clock. |
DataColumnTypes |
|
Kinds of variables in data sets. |
DPPhases |
|
Phases of DP computations. |
FlatOptions |
|
Flat views of panel data. |
GMMWeightOptions |
|
Weighting of moments in GMM. |
HookTimes |
|
Points in the solution process that users can insert static functions or methods. |
InteractionTypes |
|
Type of Interaction Auxiliary Values. |
LikelihoodTypes |
|
Type of likelihood function to build based on observability. |
NReachTypes |
|
Categories of Endgoenous State Reachability. |
SmoothingMethods |
|
Ways to smooth choice probabilities without adding an explicit continuous error ζ. |
StateCategories |
|
Categories of state variables. |
SubSpaces |
|
Groups of continguous SubVectorNames. |
SubVectorNames |
|
Vectors of state variables. |
TransStore |
|
Elements of array stored at each theta. |
UpdateTimes |
|
Point in solving when updating of parameters and transitions needs to occur. |
Vspace |
|
Names for 0 and 1 for Bellman iteration. |
|
AllGroupsExist |
static |
Integer TRUE (default) means all possible combination of fixed and random groups exist
in the group space Γ and should be created. |
CallTrans |
static |
If UpdateTime=WhenFlagIsSet then next Solve() will
update transitions. |
HasBeenUpdated |
static |
Transitions has been called. |
HasFixedEffect |
static |
Γ already includes fixed effects |
HasKeptZ |
static |
Includes a kept continuous state variable. |
inctime |
static |
time increment. |
IsErgodic |
static |
create space to store \(P(\theta';\alpha,\theta)\)
and update it if SetPstar during interation. |
NKstep |
static |
Newton-Kantorovich Step is active. |
onlyDryRun |
static |
Do not create Θ, but do everything else. |
Phase |
static |
Phase of model solution or use. |
Prunable |
static |
TRUE if clock is finite horizon so automatic pruning
can apply. |
ReadIN |
static |
Read I and N objects from .dim file (avoids one span of
the state space to find reachable indices. |
runtime |
static |
vector of time spent in each phase. |
setPstar |
static |
set \(P^*(\alpha,\cdots)\)
in Bellman |
StatStage |
static |
Stationary Stage of value iteration. |
StorePA |
static |
store Α.D x Θ.D matrix
of choice probabilities |
ThetaCreated |
static |
CreateSpaces() has been called or not. |
time0 |
static |
base time mark. |
UpdateTime |
static |
Indicators for when transit update occurs. |
UseStateList |
static |
. |
|
NewPhase |
static |
Cumulate time on current phase, report time, set new phase. |
Reset |
static |
|
SetPrunable |
static |
Sets Prunable to TRUE if the clock setting makes automatic pruning of the state space valid. |
TimeProfile |
static |
Report the time spent in different phases of the calculations. |
|
ClockTypes |
Send one of these tags as first argument to SetClock() to use that clock.
|
InfiniteHorizon, Ergodic, SubPeriods, NormalAging, StaticProgram, RandomAging, RandomMortality, UncertainLongevity, RegimeChange, SocialExperiment, UserDefined, NClockTypes |
DataColumnTypes |
Kinds of variables in data sets.
|
idvar, avar, svar, auxvar, freqvar, NColumnTypes |
DPPhases |
Phases of DP computations. The current phase is set by the code and time spent in each phase is tracked.
- See also:
- TimeProfile
|
INBETWEEN, INITIALIZING, SOLVING, SIMULATING, LIKING, PREDICTING, NDPhases |
FlatOptions |
Flat views of panel data.
|
LONG, WIDE, FlatOptions |
GMMWeightOptions |
Weighting of moments in GMM.
UNWEIGHTED | No weighting occurs |
UNCORRELATED | Each difference between empirical and predicted moments is weighted by the inverse of its (bounded)
sample standard deviation. This treats each moment as uncorrelated with other moments, including contemporaneous moments.
In addition, each moment has an ad hoc influnce weight that is read in from the data for time value t=-1.
|
IGNOREINFLUENCE | Same as UNCORRELATED, but any influence weight in the data (at t=-1)
is ignored. | \
CONTEMPORANEOUS | [NOT YET IMPLEMENTED]. This reads in a matrix of weights to apply to
each time period's differences pre |
INTERTEMPORAL | This applies a matrix of weights to the full path, read in from
files with names pathW_ff.mat and ff is the index of the fixed group. These files are created
by |
AUGMENTEDPATHW | This augments path weighting matrices. Moments that do
not vary have weight 0. This weights these moments by 0.01 so that they are matched as well as variable moments. |
|
UNWEIGHTED, UNCORRELATED, IGNOREINFLUENCE, CONTEMPORANEOUS, INTERTEMPORAL, AUGMENTEDPATHW, GMMWeightOptions |
HookTimes |
Points in the solution process that users can insert static functions or methods.
PreAuxOutcomes | Called by ExpectedOutcomes() and AuxLikelihood()
as they run, which only happen if there are AuxiliaryValues added to the model.
At this point all state variables have been synched and each aux value's Realize()
or Likelihood method will be called. This allows the model to compute realized values at
a given value of \(\eta\) and \(\theta\) and store them temporarily. |
PreUpdate | Called by Transitions(). The point this occurs depends on UpdateTime |
The times below are ordered in decreasing frequency of execution. |
AtThetaTrans | Called by Method::Run() for each endogenous state θ before
the transition is computed. |
PostSmooth | Called by Run() after each time the value of a state has been computed and
Smooth() has been called to compute choice probabilities. That is, it is called only when setPstar is TRUE. For stationary models
this is only when convergence has been reached. For non-stationary times it is after each value iteration. |
PostGSolve | Called by RandomSolve::Run() after a call to GSolve has traversed the state space. That is, after the value of
all states has been found. |
PostRESolve | Called by Run() after all random effects have been solved. That is, after all
choice probabilities relevant to observationally-equivalent problems have been computed. At this point a mixture over choice probabilities coudl be could be computed. |
PostFESolve | Called by Solve() after all fixed effect groups have been solved. That is, after all problems defined by
the user's DP model have been solved. |
GroupCreate | Called by the task that sets up the group space Gamma (Γ) before creation
of each separate group. The function added here should return TRUE if the group should be created and FALSE otherwise. |
- See also:
- Hooks, UpdateTime
|
PreAuxOutcomes, PreUpdate, AtThetaTrans, PostSmooth, PostGSolve, PostRESolve, PostFESolve, GroupCreate, NHooks |
InteractionTypes |
Type of Interaction Auxiliary Values.
|
NoInt, StateInt, ActInt, AuxInt, InteractionTypes |
LikelihoodTypes |
Type of likelihood function to build based on observability.
Tag | Explanation |
CCLike | Everything is observed except for the additive choice-specific error ζ.
Auxiliary values cannot contribute anything extra information. See CCLikelihood |
ExogLike | The exogenous vector ε is also unobserved. Under this form
the likelihood of AuxiliaryValues is relevant and AuxLikelihood() is called
for each observation and each value of ε |
PartObsLike [default] | Account for (sum over) any form of unobservability in states and actions. Currently
this form cannot incorporate likelihood of auxiliary values. |
- See also:
- OutcomeDataSet, IIDLikelihood, PartialObservedLikelihood
|
CCLike, ExogLike, PartObsLike, LikelihoodTypes |
NReachTypes |
Categories of Endgoenous State Reachability.
Tag | Means |
InUnRchble | Unreachable because a state variable is inherently unreachable |
UUnRchble | Unreacheable because a user Reachable returns FALSE |
Rchble | Reachable |
|
InUnRchble, UUnRchble, Rchble, NReachTypes |
SmoothingMethods |
Ways to smooth choice probabilities without adding an explicit continuous error ζ.
NoSmoothing
Optimal choices are equally likely, sub-optimal choices have zero choice
probability:
\(n^\star = \) number of feasible choices in \(\arg\max\ v(\alpha;\theta)\).
\(P^\star (\alpha;\theta) = I\left\{\alpha \in \arg\max_{\alpha}\ v(\alpha;\theta)\right\} / n^\star\)
Note: exogenous (ε) and semi-exogenous (η) state variables are allowed but they are suppressed in the notation for readibility.
LogitKernel
$$P^\star = {e^{\rho\left(v(\alpha)-V\right)} \over \sum_{a\in A(\theta) } e^{\rho\left(v(a)-V\right)}}$$
GaussKernel
… to be added
|
NoSmoothing, LogitKernel, GaussKernel, ExPostSmoothingMethods |
StateCategories |
Categories of state variables.
These categories are used mainly for summarizing the model.
|
NONRANDOMSV, RANDOMSV, COEVOLVINGSV, AUGMENTEDV, TIMINGV, TIMEINVARIANTV, NStateCategories |
SubSpaces |
Groups of continguous SubVectorNames.
Explanation
Many aspects of a model solution or application require processing more than one
of the vector types organized by SubVectorNames. In essentially all
such tasks the vectors to be processed are next to each other in the order they
are stored in S.
The different sets of vectors that might be needed to carry out a task are
then group into a range of elements of the sub vector list.
Different ranges of subvectors are represented as objects of the SubSpace class.
Subspace information is somewhat similar to the information in Space, and neither
class stores the state variables themselves.
Many of these ranges consist of only one vector. They are the ones that
have only in their name. For example, onlyexog
is the subspace that consists of only the endog space (the ε vector
in the mathematical description.).
The table below only describes the subspaces that are not the same as a vector.
bothexog | All state variables that either exogenous
or semi-exogenous. That is, mathematically it is the concatentation of ε and η |
tracking | All state variables that are required for tracking
results of the model solution. In the model this is simply θ again, but internally
it is both the endog and clock vectors | , except only the leftmost
element of the clock (the actual t variable) is included. This avoids storing
unnecessary information about t'.
iterating | State variables needed when iterating on
Bellman's equation. This subspace includes all elements of the clock block. |
bothgroup | The full group vector γ, concatenating
the rgroup and fgroup spaces. |
|
onlyacts, onlyexog, onlysemiexog, bothexog, onlyendog, tracking, onlyclock, allstates, iterating, onlyrand, onlydynrand, onlyfixed, bothgroup, DSubSpaces |
SubVectorNames |
Vectors of state variables.
Explanation
Typically the user does not need to use these names unless building a new solution method
or similar core programming. This information is for those curious about how the underlying code
is organized.
In the mathematical description of a DDP model, there are several
vectors of variables. These variables are represented by objects in the model
and the overall list of variable objects added to the model is stored in States.
The vectors themselves are lists (oxarray s) of objects which store
store a pointer to (not a separate copy of) the state variables in States.
This list of lists of variables is stored in SubVectors.
To get things done the aspects of the separate state variables has to be combined
into information about the vector they belong. The list SubVectors itself cannot
capture that aggregate information.
This aggreate information about the variables in a vector include how many endogenous
state variables there are and how many points in the space they create. This information
is constructed by CreateSpaces() for each vector and storedin objects of the Space class.
The list of Space objects is itself an oxarray held in DP::S (which is
documented only in the internal version of this documentation).
The integer tags listed here are the internal names of the elements of both that array
and the array SubVectors of variable objects.
For example, when the user's code calls EndogenousStates() it adds the objects
sent as arguments to the list DP::SubVectors[endog] . Then CreateSpaces()
will go through that list and create information about the endogenous space Θ
and store it in object DP::S[endog]
acts | The components of the action vector α.
Including action variables in the same list of lists makes the internal code
a little cleaner. |
exog | The fully exogenous vector ε |
semiexog | The semi-exogenous vector η |
endog | The endogenous vector θ (not including the clock). |
clock | The clock block. In the mathematical description the
clock is an element of θ to avoid yet another vector and Greek letter. However,
internally it is easier to separate the clock block from θ |
rgroup | The RandomEffect elements of the group vector γ.
Again, to avoid extra notation, the mathematical description puts both random
and fixed effects into one vector, but internally they are stored on separate
lists. |
fgroup | The FixedEffect elements of γ. |
DSubVectors | The number of different vectors. |
LeftSV | Equivalent to exog . This is the index
of the leftmost true state vector. This ensures some internal loops over
vectors start at the right place even if additional vectors have to be added
later to the code. |
|
acts, exog, semiexog, endog, clock, rgroup, fgroup, DSubVectors, LeftSV |
TransStore |
Elements of array stored at each theta.
|
Qtr, Qit, Qrho, TransStore |
UpdateTimes |
Point in solving when updating of parameters and transitions needs to occur.
InCreateSpaces | Transitions do not depend on any parameters that change so they can be initialized
in CreateSpaces() and never recalculated. |
WhenFlagIsSet | Update transitions at the start of Solve() but ONLY if the RecomputeTrans() has
been called. This ensures that if transitions depend on parameters that are controlled by the outside but multiple calls to solve
will be made for the same parameter values (say while computing equilibrium prices and transitions only depend on parameters) |
OnlyOnce | Update transitions just once on each call to Solve(). This ensures that if transitions depend
on parameters that are controlled by the outside (say by an optimization algorithm) the probabilities used in solving the model will
reflect any changes in the parameters since the last time the solution method was applied. |
AfterFixed | Update transitions after the value of the fixed groups is set. This will allow transitions to depend on the value of
fixed effect variables. |
AfterRandom | Update transitions after the value of the random groups is set. This will allow transitions to depend on the value of
both fixed and random effect variables. |
There is a potentially large computational cost of updating the transitions more often than is necessary.
- See also:
- SetUpdateTime
|
InCreateSpaces, WhenFlagIsSet, OnlyOnce, AfterFixed, AfterRandom, UpdateTimes |
Vspace |
Names for 0 and 1 for Bellman iteration.
In ValueIteration an 2-array of vectors are stored as scratch-space for Bellman
iteration. now and later toggled back and forth between 0 and 1
as iteration procedes which avoids copy potentially large vectors each time.
|
NOW, LATER, DVspace |