Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrall committed Jul 3, 2023
1 parent 170b6a3 commit 9b4b769
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Binary file modified include/Data.oxo
Binary file not shown.
Binary file modified include/Objective.oxo
Binary file not shown.
Binary file modified include/Shared.oxo
Binary file not shown.
10 changes: 7 additions & 3 deletions source/DDP/Outcomes.ox
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ Outcome::PartialObservedLikelihood() {
arows=ind[onlyacts][Ainds[q]]; //action rows consistent with this state
PS = GetPstar(viinds[now][q])[arows][]; //choice probabilities of consistent actions
ue = GetUseEps(viinds[now][q]);
println("%%% ",q," ",PS);
// println("%%% ",q," ",PS);
for (h = 0,totprob = 0.0;h<nh;++h) { //loop over semi-exogenous values
bothrows = dosemi[h]*N::Ewidth + einds; //combination of consistent epsilon and eta values
curprob = sumr( PS[][ bothrows ].*(ue ? NxtExog[Qprob][ bothrows ]' : 1.0/nh ) )'; //combine cond. choice prob. and iid prob. over today's shocks
Expand Down Expand Up @@ -999,14 +999,17 @@ Outcome::AccountForUnobservables() {
if ( (ind[ss]==DoAll)|| any(isdotnan(state[SS[ss].left:SS[ss].right]))) { //have to integrate over states
AnyMissing[ss] = TRUE;
ind[ss] = VZero;
for(s=SS[ss].left;s<=SS[ss].right;++s)
// if (ss==tracking) println(I::OO[ss]);
for(s=SS[ss].left;s<=SS[ss].right;++s) {
if ( I::OO[ss][s] ) { //more than one value of state s
if (isnan(state[s])) // all values of s are possible
ind[ss] = vec(ind[ss]+reshape(I::OO[ss][s]*States[s].vals',
rows(ind[ss]),States[s].N)); //Oct. 2018 was .actual????
else
ind[ss] += I::OO[ss][s]*state[s]; // add index of observed state value
}
// if (ss==tracking) println(s," ",state[s],ind[ss],States[s].vals);
}
}
s = 0;
Ainds = <>;
Expand Down Expand Up @@ -1145,7 +1148,8 @@ OutcomeDataSet::LoadOxDB() {
cur = fparray[inf];
else //fparray does not point to self
cur = this; // MAYBE SHOULD BE first ???
cur->FPanel::Append(curid = curd[idvar],curd[freqvar]);
curid = curd[idvar];
cur->FPanel::Append(curid,curd[freqvar]);
++FN;
}
fpcur = cur->GetCur();
Expand Down

0 comments on commit 9b4b769

Please sign in to comment.