(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 10.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 163587, 4212] NotebookOptionsPosition[ 159414, 4077] NotebookOutlinePosition[ 159760, 4092] CellTagsIndexPosition[ 159717, 4089] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell["\<\ This code produces the table of results in \[OpenCurlyDoubleQuote]On the \ Non-Identification of Counterfactuals in Dynamic \ Games\[CloseCurlyDoubleQuote] by Kalouptsidi, Scott, and Souza-Rodrigues please report any errors to ptscott@gmail.com\ \>", "Text", CellChangeTimes->{{3.663427712666915*^9, 3.663427782564065*^9}}], Cell[CellGroupData[{ Cell["Model", "Section", CellChangeTimes->{{3.65502233822126*^9, 3.6550223487305384`*^9}, { 3.6633228878147883`*^9, 3.6633228882207904`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", "parameters", " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"beta", "=", ".9"}], ";"}], " ", RowBox[{"(*", " ", RowBox[{"discount", " ", "factor"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"r", "=", ".1"}], ";"}], " ", RowBox[{"(*", " ", RowBox[{"scrap", " ", "value"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"c", "=", RowBox[{"-", ".2"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{"entry", " ", "cost"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"piparam1", "=", "1.2"}], ";"}], RowBox[{"(*", " ", RowBox[{"monopoly", " ", "profits"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"piparam2", "=", RowBox[{"-", "1.2"}]}], ";"}], RowBox[{"(*", " ", RowBox[{"duopoly", " ", "profits"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"trans", "[", RowBox[{"a_", ",", "s_"}], "]"}], ":=", "a"}], ";"}], " ", RowBox[{"(*", " ", RowBox[{"transition", " ", "of", " ", "states"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"var", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"basetheta", "=", RowBox[{"{", RowBox[{"r", ",", "c", ",", "piparam1", ",", "piparam2"}], "}"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"NumericListQ", "[", "list_", "]"}], ":=", RowBox[{"And", "@@", RowBox[{"NumericQ", "/@", "list"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"NumericArrayQ", "[", "list_", "]"}], ":=", RowBox[{"And", "@@", RowBox[{"NumericQ", "/@", RowBox[{"Flatten", "[", "list", "]"}]}]}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "convert", " ", "bivariate", " ", "state", " ", "vector", " ", "to", " ", "integer"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"s2x", "[", "s_", "]"}], ":=", RowBox[{"Switch", "[", RowBox[{"s", ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"2", ",", "2"}], "}"}], ",", "1", ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"2", ",", "1"}], "}"}], ",", "2", ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", "3", ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", "4"}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "convert", " ", "index", " ", "of", " ", "state", " ", "vector", " ", "to", " ", "bivariate"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"x2s", "[", "x_", "]"}], ":=", RowBox[{"Switch", "[", RowBox[{"x", ",", "\[IndentingNewLine]", "1", ",", RowBox[{"{", RowBox[{"2", ",", "2"}], "}"}], ",", "\[IndentingNewLine]", "2", ",", RowBox[{"{", RowBox[{"2", ",", "1"}], "}"}], ",", "\[IndentingNewLine]", "3", ",", RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", "\[IndentingNewLine]", "4", ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"payoff", " ", "function"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"pii", "[", RowBox[{ "aown_", ",", "aother_", ",", "sown_", ",", "sother_", ",", "theta_", ",", "norm_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"pay", ",", "r", ",", "c", ",", "pi1", ",", "pi2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"r", "=", RowBox[{"theta", "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"c", "=", RowBox[{"theta", "[", RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"pi1", "=", RowBox[{"theta", "[", RowBox[{"[", "3", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"pi2", "=", RowBox[{"theta", "[", RowBox[{"[", "4", "]"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"norm", "\[Equal]", "1"}], ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"PSD", " ", "version"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"aown", "\[Equal]", "2"}], "&&", RowBox[{"sown", "\[Equal]", "2"}]}], ",", RowBox[{ RowBox[{"pay", "=", "0"}], ";"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"aown", "\[Equal]", "2"}], "&&", RowBox[{"sown", "\[Equal]", "1"}]}], ",", RowBox[{ RowBox[{"pay", "=", "r"}], ";"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"aown", "\[Equal]", "1"}], "&&", RowBox[{"aother", "\[Equal]", "2"}], "&&", RowBox[{"sown", "\[Equal]", "2"}]}], ",", RowBox[{ RowBox[{"pay", "=", RowBox[{"pi1", "+", "c"}]}], ";"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"aown", "\[Equal]", "1"}], "&&", RowBox[{"aother", "\[Equal]", "2"}], "&&", RowBox[{"sown", "\[Equal]", "1"}]}], ",", RowBox[{ RowBox[{"pay", "=", "pi1"}], ";"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"aown", "\[Equal]", "1"}], "&&", RowBox[{"aother", "\[Equal]", "1"}], "&&", RowBox[{"sown", "\[Equal]", "2"}]}], ",", RowBox[{ RowBox[{"pay", "=", RowBox[{"pi2", "+", "c"}]}], ";"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"aown", "\[Equal]", "1"}], "&&", RowBox[{"aother", "\[Equal]", "1"}], "&&", RowBox[{"sown", "\[Equal]", "1"}]}], ",", RowBox[{ RowBox[{"pay", "=", "pi2"}], ";"}]}], "]"}], ";"}], ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "version", " ", "where", " ", "payoffs", " ", "everything", " ", "except", " ", RowBox[{"(", RowBox[{"a1", ",", "a2"}], ")"}]}], " ", "=", " ", RowBox[{ RowBox[{"(", RowBox[{"1", ",", "1"}], ")"}], " ", "are", " ", "normalized"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"pay", "=", "0"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"aown", "\[Equal]", "1"}], "&&", RowBox[{"aother", "\[Equal]", "1"}]}], ",", RowBox[{ RowBox[{"pay", "=", RowBox[{"theta", "[", RowBox[{"[", RowBox[{"s2x", "[", RowBox[{"{", RowBox[{"sown", ",", "sother"}], "}"}], "]"}], "]"}], "]"}]}], ";"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"aown", "\[Equal]", "1"}], "&&", RowBox[{"sown", "\[Equal]", "2"}]}], ",", RowBox[{"pay", "=", RowBox[{"pay", "+", RowBox[{"theta", "[", RowBox[{"[", "5", "]"}], "]"}]}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "pay"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"s", " ", "=", " ", RowBox[{"2", " ", "means", " ", "was", " ", "inactive"}]}], ",", " ", RowBox[{"a", " ", "=", " ", RowBox[{"2", " ", "means", " ", "is", " ", "inactive"}]}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"pi", "[", RowBox[{"a_", ",", "s_", ",", "theta_", ",", "norm_"}], "]"}], ":=", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"pii", "[", RowBox[{ RowBox[{"a", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"a", "[", RowBox[{"[", "2", "]"}], "]"}], ",", RowBox[{"s", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"s", "[", RowBox[{"[", "2", "]"}], "]"}], ",", "theta", ",", "norm"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"pii", "[", RowBox[{ RowBox[{"a", "[", RowBox[{"[", "2", "]"}], "]"}], ",", RowBox[{"a", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"s", "[", RowBox[{"[", "2", "]"}], "]"}], ",", RowBox[{"s", "[", RowBox[{"[", "1", "]"}], "]"}], ",", "theta", ",", "norm"}], "]"}]}], "\[IndentingNewLine]", "}"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"transition", " ", "matrix"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"PM", "[", "sigma_", "]"}], ":=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}]}], ")"}], "*", RowBox[{"(", RowBox[{"1", "-", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}]}], ",", RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}]}], ")"}], "*", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "*", RowBox[{"(", RowBox[{"1", "-", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}]}], ",", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "*", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "}"}], "&"}], ",", "sigma"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"full", " ", "strategy", " ", "matrix"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"PC", "[", "sigma_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "sigmaFull", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"sigmaFull", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"#", ",", RowBox[{"1", "-", "#"}]}], "}"}], "&"}], ",", "sigma", ",", RowBox[{"{", "2", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"sigmaFull", "[", RowBox[{"[", "x", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "[", RowBox[{"[", "a1", "]"}], "]"}], "*", RowBox[{ RowBox[{ RowBox[{"sigmaFull", "[", RowBox[{"[", "x", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}], "[", RowBox[{"[", "a2", "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"a1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"a2", ",", "1", ",", "2"}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]"}]}]], "Input", CellChangeTimes->{{3.6550223732177324`*^9, 3.6550223822134733`*^9}, { 3.6550227322971773`*^9, 3.6550227359057465`*^9}, {3.6615880327522497`*^9, 3.6615880586043367`*^9}, {3.661861035317958*^9, 3.6618610405592756`*^9}, { 3.6624702418940334`*^9, 3.6624703025045*^9}, {3.662717336916269*^9, 3.6627175270169525`*^9}, {3.662717565545024*^9, 3.6627175700267944`*^9}, { 3.662717606791501*^9, 3.6627176142791243`*^9}, {3.662717724445629*^9, 3.6627177300973206`*^9}, {3.6627179425189805`*^9, 3.6627180563731537`*^9}, 3.662718197216919*^9, {3.6627185753508043`*^9, 3.662718609304963*^9}, { 3.6627190868394904`*^9, 3.6627190871685057`*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Equilibrium solver", "Section", CellChangeTimes->{{3.65502233822126*^9, 3.6550223645209208`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{ "need", " ", "code", " ", "to", " ", "solve", " ", "for", " ", "symmetric", " ", RowBox[{"eq", "'"}], "m", " ", "of", " ", "game", " ", "given", " ", "primitives"}], ",", " ", RowBox[{"starting", " ", "value", " ", "for", " ", "strategies"}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "expected", " ", "error", " ", "term", " ", "given", " ", "choice", " ", "probability"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"EEps", "[", "p_", "]"}], ":=", RowBox[{"NIntegrate", "[", RowBox[{ RowBox[{"x", "*", RowBox[{"PDF", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", RowBox[{"Sqrt", "[", "var", "]"}]}], "]"}], ",", "x"}], "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"InverseCDF", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", RowBox[{"Sqrt", "[", "var", "]"}]}], "]"}], ",", RowBox[{"1", "-", "p"}]}], "]"}], ",", "\[Infinity]"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"conditional", " ", "value"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Clear", "[", "EACV", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"EACV", "[", RowBox[{"V_", ",", "theta_", ",", "norm_"}], "]"}], ":=", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"pi", "[", RowBox[{ RowBox[{"{", RowBox[{"a1", ",", "a2"}], "}"}], ",", RowBox[{"x2s", "[", "x", "]"}], ",", "theta", ",", "norm"}], "]"}], "+", RowBox[{"beta", "*", RowBox[{"V", "[", RowBox[{"[", RowBox[{"s2x", "[", RowBox[{"trans", "[", RowBox[{ RowBox[{"{", RowBox[{"a1", ",", "a2"}], "}"}], ",", RowBox[{"x2s", "[", "x", "]"}]}], "]"}], "]"}], "]"}], "]"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"x", ",", "1", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"a1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"a2", ",", "1", ",", "2"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"ex", " ", "ante", " ", "value", " ", "function"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Clear", "[", "EV", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"EV", "[", RowBox[{ RowBox[{"sigma_", "?", "NumericArrayQ"}], ",", "V_", ",", "theta_", ",", "norm_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"eacv", ",", "pc"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"eacv", "=", RowBox[{"EACV", "[", RowBox[{"V", ",", "theta", ",", "norm"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"pc", "=", RowBox[{"PC", "[", "sigma", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"Plus", "@@@", RowBox[{"(", RowBox[{"Plus", "@@@", RowBox[{"(", RowBox[{"pc", "*", "eacv"}], ")"}]}], ")"}]}], "+", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"EEps", "[", "#", "]"}], "&"}], ",", "sigma", ",", RowBox[{"{", "2", "}"}]}], "]"}]}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"symbolic", " ", "value", " ", "function", " ", "variables"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"vSymb", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"ToExpression", "[", RowBox[{"\"\\"", "<>", RowBox[{"ToString", "[", "x", "]"}], "<>", RowBox[{"ToString", "[", "i", "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "2"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"vVec", "=", RowBox[{"Flatten", "[", "vSymb", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"solve", " ", "value", " ", "function", " ", "symbolically"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"VFSolve", "[", RowBox[{"sigma_", ",", "theta_", ",", "norm_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"vIt", ",", "freq", ",", "bellmanEq", ",", "repl"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"vIt", ",", "freq"}], "}"}], "=", RowBox[{"EV", "[", RowBox[{"sigma", ",", "vSymb", ",", "eSim"}], "]"}]}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"vIt", "=", RowBox[{"EV", "[", RowBox[{"sigma", ",", "vSymb", ",", "theta", ",", "norm"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"bellmanEq", "=", RowBox[{"Flatten", "[", RowBox[{"vSymb", "==", "vIt"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"repl", "=", RowBox[{"First", "[", RowBox[{"Solve", "[", RowBox[{"bellmanEq", ",", "vVec"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"N", "[", RowBox[{"vSymb", "/.", "repl"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Clear", "[", "BR", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"best", " ", "response", " ", "function"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"BR", "[", RowBox[{ RowBox[{"sigma_", "?", "NumericArrayQ"}], ",", "V_", ",", "theta_", ",", "norm_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "sigma1", ",", "sigma2", ",", "eacv1", ",", "eacv2", ",", "eav1", ",", "eav2", ",", "deav1", ",", "deav2", ",", "br1", ",", "br2"}], "}"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"sigma1", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "&"}], ",", "sigma"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sigma2", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "&"}], ",", "sigma"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"eacv1", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "&"}], ",", RowBox[{"EACV", "[", RowBox[{"V", ",", "theta", ",", "norm"}], "]"}], ",", RowBox[{"{", "3", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sigma2", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"#", ",", RowBox[{"1", "-", "#"}]}], "}"}], "&"}], ",", "sigma2"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"eacv1", "=", RowBox[{"Transpose", "[", RowBox[{"eacv1", ",", RowBox[{"{", RowBox[{"1", ",", "3", ",", "2"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"eav1", "=", RowBox[{"Plus", "@@@", RowBox[{"(", RowBox[{"sigma2", "*", "eacv1"}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"deav1", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "-", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "&"}], ",", "eav1"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"br1", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"CDF", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", RowBox[{"Sqrt", "[", "var", "]"}]}], "]"}], ",", "#"}], "]"}], "&"}], ",", "deav1"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"eacv2", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "&"}], ",", RowBox[{"EACV", "[", RowBox[{"V", ",", "theta", ",", "norm"}], "]"}], ",", RowBox[{"{", "3", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sigma1", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"#", ",", RowBox[{"1", "-", "#"}]}], "}"}], "&"}], ",", "sigma1"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"eav2", "=", RowBox[{"Plus", "@@@", RowBox[{"(", RowBox[{"sigma1", "*", "eacv2"}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"deav2", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "-", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "&"}], ",", "eav2"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"br2", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"CDF", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", RowBox[{"Sqrt", "[", "var", "]"}]}], "]"}], ",", "#"}], "]"}], "&"}], ",", "deav2"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"br1", "[", RowBox[{"[", "x", "]"}], "]"}], ",", RowBox[{"br2", "[", RowBox[{"[", "x", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "4"}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"BR", "[", RowBox[{ RowBox[{"sigma_", "?", "NumericArrayQ"}], ",", "theta_", ",", "norm_"}], "]"}], ":=", RowBox[{"BR", "[", RowBox[{"sigma", ",", RowBox[{"VFSolve", "[", RowBox[{"sigma", ",", "theta", ",", "norm"}], "]"}], ",", "theta", ",", "norm"}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"FOC", "[", RowBox[{ RowBox[{"sigma_", "?", "NumericArrayQ"}], ",", "theta_", ",", "norm_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "sigma1", ",", "sigma2", ",", "sigma1full", ",", "sigma2full", ",", "V", ",", "eacv1", ",", "eacv2", ",", "eav1", ",", "eav2", ",", "dpids1", ",", "dpids2"}], "}"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"sigma1", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "&"}], ",", "sigma"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sigma2", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "&"}], ",", "sigma"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sigma1full", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"#", ",", RowBox[{"1", "-", "#"}]}], "}"}], "&"}], ",", "sigma1"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sigma2full", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"#", ",", RowBox[{"1", "-", "#"}]}], "}"}], "&"}], ",", "sigma2"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"V", "=", RowBox[{"VFSolve", "[", RowBox[{"sigma", ",", "theta", ",", "norm"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Vtemp", "=", "V"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"eacv1", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "&"}], ",", RowBox[{"EACV", "[", RowBox[{"V", ",", "theta", ",", "norm"}], "]"}], ",", RowBox[{"{", "3", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"eacv1", "=", RowBox[{"Transpose", "[", RowBox[{"eacv1", ",", RowBox[{"{", RowBox[{"1", ",", "3", ",", "2"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"eav1", "=", RowBox[{"Plus", "@@@", RowBox[{"(", RowBox[{"sigma2full", "*", "eacv1"}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"dpids1", "=", RowBox[{ RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "-", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "&"}], ",", "eav1"}], "]"}], "-", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"InverseCDF", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", RowBox[{"Sqrt", "[", "var", "]"}]}], "]"}], ",", "#"}], "]"}], "&"}], ",", "sigma1"}], "]"}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"eacv2", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "&"}], ",", RowBox[{"EACV", "[", RowBox[{"V", ",", "theta", ",", "norm"}], "]"}], ",", RowBox[{"{", "3", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"eav2", "=", RowBox[{"Plus", "@@@", RowBox[{"(", RowBox[{"sigma1full", "*", "eacv2"}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"dpids2", "=", RowBox[{ RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "-", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "&"}], ",", "eav2"}], "]"}], "-", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"InverseCDF", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", RowBox[{"Sqrt", "[", "var", "]"}]}], "]"}], ",", "#"}], "]"}], "&"}], ",", "sigma2"}], "]"}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"dpids1", "[", RowBox[{"[", "x", "]"}], "]"}], ",", RowBox[{"dpids2", "[", RowBox[{"[", "x", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "4"}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SolveSymmetric", "[", RowBox[{"theta_", ",", "norm_", ",", "updates_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "iter", "}"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sse", "[", RowBox[{"sigma_", "?", "NumericArrayQ"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "objval", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"objval", "=", RowBox[{"Plus", "@@", RowBox[{"(", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"FOC", "[", RowBox[{"sigma", ",", "theta", ",", "norm"}], "]"}], "]"}], "^", "2"}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Mod", "[", RowBox[{"iter", ",", "updates"}], "]"}], "\[Equal]", "0"}], ",", RowBox[{"Print", "[", RowBox[{"{", RowBox[{"sigma", ",", "objval", ",", "iter"}], "}"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", "objval"}]}], "\[IndentingNewLine]", "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"strategy", " ", "parameters"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"sSymb", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"s00", ",", "s00"}], "}"}], ",", RowBox[{"{", RowBox[{"s01", ",", "s10"}], "}"}], ",", RowBox[{"{", RowBox[{"s10", ",", "s01"}], "}"}], ",", RowBox[{"{", RowBox[{"s11", ",", "s11"}], "}"}]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"sVars", "=", RowBox[{"{", RowBox[{"s00", ",", "s10", ",", "s01", ",", "s11"}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"sStart", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"s00", ",", "0.58"}], "}"}], ",", RowBox[{"{", RowBox[{"s01", ",", ".3"}], "}"}], ",", RowBox[{"{", RowBox[{"s10", ",", ".84"}], "}"}], ",", RowBox[{"{", RowBox[{"s11", ",", ".59"}], "}"}]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"contstraint", " ", "on", " ", "probabilities"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"sCons", "=", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"0", "<=", RowBox[{ RowBox[{"sSymb", "[", RowBox[{"[", "x", "]"}], "]"}], "[", RowBox[{"[", "i", "]"}], "]"}], "\[LessEqual]", "1"}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "2"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"iter", "=", "0"}], ";", "\[IndentingNewLine]", RowBox[{"Timing", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"eqmB", "=", RowBox[{"FindMinimum", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"sse", "[", "sSymb", "]"}], ",", RowBox[{"And", "@@", "sCons"}]}], "}"}], ",", "sStart", ",", RowBox[{"MaxIterations", "\[Rule]", "25"}], ",", RowBox[{"AccuracyGoal", "\[Rule]", "4"}], ",", RowBox[{"PrecisionGoal", "\[Rule]", "4"}], ",", RowBox[{"EvaluationMonitor", "\[RuleDelayed]", RowBox[{"iter", "++"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "eqmB"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}]}]], "Input", CellChangeTimes->{{3.6550217032244697`*^9, 3.6550219214648256`*^9}, { 3.655022323772805*^9, 3.6550223313173637`*^9}, {3.655022366511307*^9, 3.655022369086796*^9}, {3.6550224323467336`*^9, 3.6550224328551025`*^9}, { 3.6550224755697126`*^9, 3.655022483247483*^9}, {3.6550225630915275`*^9, 3.6550226500750217`*^9}, {3.6550226895623217`*^9, 3.6550227680606523`*^9}, {3.6550233138242025`*^9, 3.655023470503828*^9}, { 3.6550235054520035`*^9, 3.6550237273785896`*^9}, {3.6550245258703527`*^9, 3.6550245260515113`*^9}, {3.65502468663165*^9, 3.655024689759874*^9}, { 3.655024762095625*^9, 3.655024762640011*^9}, 3.6551481519339657`*^9, { 3.6615613918884754`*^9, 3.661561394892988*^9}, {3.661588637601733*^9, 3.6615886543559384`*^9}, {3.6616974519684925`*^9, 3.661697453902029*^9}, { 3.6627126593838806`*^9, 3.662712661788413*^9}, {3.6627180660285044`*^9, 3.6627181515893555`*^9}, {3.6627183353449893`*^9, 3.662718335826167*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Solve for Equilibrium", "Section", CellChangeTimes->{{3.65502233822126*^9, 3.6550223645209208`*^9}, { 3.655024801797338*^9, 3.6550248029281445`*^9}, {3.655148122533553*^9, 3.6551481366677275`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"solve", " ", "for", " ", RowBox[{"PSD", "'"}], "s", " ", "symmetric", " ", "equilibrium"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"eqmBase", "=", RowBox[{"SolveSymmetric", "[", RowBox[{"basetheta", ",", "1", ",", "50"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"VBase", "=", "Vtemp"}], ";"}]}]}]], "Input", CellChangeTimes->{{3.655023769284421*^9, 3.65502377374259*^9}, { 3.65502482196655*^9, 3.6550248310570235`*^9}, {3.655148154264604*^9, 3.655148156944538*^9}, {3.6627126674680295`*^9, 3.662712671677922*^9}, { 3.6627181617477007`*^9, 3.6627181618874903`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.58`", ",", "0.58`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.3`", ",", "0.84`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.84`", ",", "0.3`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.59`", ",", "0.59`"}], "}"}]}], "}"}], ",", "0.008298096878441984`", ",", "0"}], "}"}]], "Print", CellChangeTimes->{3.6627176371188717`*^9, 3.662717686849612*^9, 3.6627177352432547`*^9, 3.6627181626086936`*^9, 3.6627182358961325`*^9, 3.6627183403774457`*^9, 3.6628915798760276`*^9, 3.6629038389472446`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.48318796225901245`", ",", "0.48318796225901245`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.41417409587652715`", ",", "0.6127816129738676`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.6127816129738676`", ",", "0.41417409587652715`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.5043257959451022`", ",", "0.5043257959451022`"}], "}"}]}], "}"}], ",", "0.07658865959343121`", ",", "50"}], "}"}]], "Print", CellChangeTimes->{3.6627176371188717`*^9, 3.662717686849612*^9, 3.6627177352432547`*^9, 3.6627181626086936`*^9, 3.6627182358961325`*^9, 3.6627183403774457`*^9, 3.6628915798760276`*^9, 3.6629038414846563`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.5084773750239908`", ",", "0.5084773750239908`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.41489551832778804`", ",", "0.6272245227368092`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.6272245227368092`", ",", "0.41489551832778804`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.5314086764560269`", ",", "0.5314086764560269`"}], "}"}]}], "}"}], ",", "0.00628505217649946`", ",", "100"}], "}"}]], "Print", CellChangeTimes->{3.6627176371188717`*^9, 3.662717686849612*^9, 3.6627177352432547`*^9, 3.6627181626086936`*^9, 3.6627182358961325`*^9, 3.6627183403774457`*^9, 3.6628915798760276`*^9, 3.662903844010667*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.554166334864456`", ",", "0.554166334864456`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.32864975486073805`", ",", "0.7935056309726706`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.7935056309726706`", ",", "0.32864975486073805`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.5738601807663667`", ",", "0.5738601807663667`"}], "}"}]}], "}"}], ",", "0.0021584155512698725`", ",", "150"}], "}"}]], "Print", CellChangeTimes->{3.6627176371188717`*^9, 3.662717686849612*^9, 3.6627177352432547`*^9, 3.6627181626086936`*^9, 3.6627182358961325`*^9, 3.6627183403774457`*^9, 3.6628915798760276`*^9, 3.6629038465444794`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.566427484943635`", ",", "0.566427484943635`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.31636900755000236`", ",", "0.819593713717417`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.819593713717417`", ",", "0.31636900755000236`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.585874564148402`", ",", "0.585874564148402`"}], "}"}]}], "}"}], ",", "0.00022412506482224597`", ",", "200"}], "}"}]], "Print", CellChangeTimes->{3.6627176371188717`*^9, 3.662717686849612*^9, 3.6627177352432547`*^9, 3.6627181626086936`*^9, 3.6627182358961325`*^9, 3.6627183403774457`*^9, 3.6628915798760276`*^9, 3.6629038490934916`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.5758579393036596`", ",", "0.5758579393036596`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.30413145276416115`", ",", "0.843072634389529`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.843072634389529`", ",", "0.30413145276416115`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.5950930917624059`", ",", "0.5950930917624059`"}], "}"}]}], "}"}], ",", "3.5251517426065957`*^-7", ",", "250"}], "}"}]], "Print", CellChangeTimes->{3.6627176371188717`*^9, 3.662717686849612*^9, 3.6627177352432547`*^9, 3.6627181626086936`*^9, 3.6627182358961325`*^9, 3.6627183403774457`*^9, 3.6628915798760276`*^9, 3.6629038516183033`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.5755707723508335`", ",", "0.5755707723508335`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.3045078249811816`", ",", "0.8423118190204912`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.8423118190204912`", ",", "0.3045078249811816`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.5948104359862465`", ",", "0.5948104359862465`"}], "}"}]}], "}"}], ",", "3.564451932092538`*^-14", ",", "300"}], "}"}]], "Print", CellChangeTimes->{3.6627176371188717`*^9, 3.662717686849612*^9, 3.6627177352432547`*^9, 3.6627181626086936`*^9, 3.6627182358961325`*^9, 3.6627183403774457`*^9, 3.6628915798760276`*^9, 3.662903854171315*^9}] }, Open ]], Cell[BoxData[ RowBox[{"{", RowBox[{"3.564451932092538`*^-14", ",", RowBox[{"{", RowBox[{ RowBox[{"s00", "\[Rule]", "0.5755707723508335`"}], ",", RowBox[{"s01", "\[Rule]", "0.3045078249811816`"}], ",", RowBox[{"s10", "\[Rule]", "0.8423118190204912`"}], ",", RowBox[{"s11", "\[Rule]", "0.5948104359862465`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.655148246280081*^9, 3.6555460201184826`*^9, 3.655726032760806*^9, 3.6558129765335693`*^9, 3.656359208837044*^9, 3.661428596349965*^9, 3.6615594982602205`*^9, 3.6615615214193544`*^9, 3.661588673604559*^9, 3.6616056121807985`*^9, 3.66169745498295*^9, 3.6617677977891617`*^9, 3.6618603051844273`*^9, 3.6618649849014454`*^9, 3.66201590706903*^9, 3.662123263944869*^9, 3.6621966681333895`*^9, 3.6622303292766805`*^9, 3.662382650033402*^9, 3.6624586283704305`*^9, 3.6626639731107464`*^9, 3.662699798130193*^9, 3.662712687017332*^9, 3.6627127363457184`*^9, { 3.6627176305935545`*^9, 3.662717637229993*^9}, 3.6627176868866396`*^9, 3.6627177493939004`*^9, 3.662718162659745*^9, 3.662718236063665*^9, 3.662718358197323*^9, 3.662891596722052*^9, 3.6629038554561214`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "solve", " ", "for", " ", "equilibrium", " ", "of", " ", "counterfactual", " ", "game"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"dpi", "=", RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", ".25"}], ",", "0", ",", "0"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"cftheta", "=", RowBox[{"basetheta", "+", "dpi"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"eqmCF", "=", RowBox[{"SolveSymmetric", "[", RowBox[{"cftheta", ",", "1", ",", "50"}], "]"}]}]}]}]], "Input", CellChangeTimes->{{3.655024836515736*^9, 3.6550249349284983`*^9}, { 3.6551481766559286`*^9, 3.655148179151704*^9}, 3.6618613855822144`*^9, { 3.66186157193931*^9, 3.661861577013856*^9}, 3.661863343874793*^9, { 3.661863835024725*^9, 3.661863852475745*^9}, {3.661865094979718*^9, 3.661865096581589*^9}, {3.6620174068600993`*^9, 3.662017410496131*^9}, { 3.6627183947674513`*^9, 3.66271839485135*^9}, {3.662891554856991*^9, 3.662891558756996*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.58`", ",", "0.58`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.3`", ",", "0.84`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.84`", ",", "0.3`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.59`", ",", "0.59`"}], "}"}]}], "}"}], ",", "0.18289345238011157`", ",", "0"}], "}"}]], "Print", CellChangeTimes->{3.6627183954917164`*^9, 3.6628915968620524`*^9, 3.662893135878312*^9, 3.6629038555965214`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.45409976606620095`", ",", "0.45409976606620095`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.4265188671357942`", ",", "0.549483590722986`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.549483590722986`", ",", "0.4265188671357942`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.49833972349228206`", ",", "0.49833972349228206`"}], "}"}]}], "}"}], ",", "0.229122525171432`", ",", "50"}], "}"}]], "Print", CellChangeTimes->{3.6627183954917164`*^9, 3.6628915968620524`*^9, 3.662893135878312*^9, 3.662903858225133*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.4672917379094655`", ",", "0.4672917379094655`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.4271473302315103`", ",", "0.5863141028576551`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.5863141028576551`", ",", "0.4271473302315103`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.5411210413077969`", ",", "0.5411210413077969`"}], "}"}]}], "}"}], ",", "0.1127799911800299`", ",", "100"}], "}"}]], "Print", CellChangeTimes->{3.6627183954917164`*^9, 3.6628915968620524`*^9, 3.662893135878312*^9, 3.6629038607621436`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.5391946750912094`", ",", "0.5391946750912094`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.29045508789076824`", ",", "0.8679156663616379`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.8679156663616379`", ",", "0.29045508789076824`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.6065636142223907`", ",", "0.6065636142223907`"}], "}"}]}], "}"}], ",", "0.0818551053432292`", ",", "150"}], "}"}]], "Print", CellChangeTimes->{3.6627183954917164`*^9, 3.6628915968620524`*^9, 3.662893135878312*^9, 3.662903863347356*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.5712133822745803`", ",", "0.5712133822745803`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.25955857857279574`", ",", "0.9332974115126271`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.9332974115126271`", ",", "0.25955857857279574`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.63574152811247`", ",", "0.63574152811247`"}], "}"}]}], "}"}], ",", "0.055031920331605366`", ",", "200"}], "}"}]], "Print", CellChangeTimes->{3.6627183954917164`*^9, 3.6628915968620524`*^9, 3.662893135878312*^9, 3.6629038659457664`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.6279260867941747`", ",", "0.6279260867941747`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.21331580078240264`", ",", "0.9785541162909732`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.9785541162909732`", ",", "0.21331580078240264`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.6862922745770962`", ",", "0.6862922745770962`"}], "}"}]}], "}"}], ",", "0.0008387416487547974`", ",", "250"}], "}"}]], "Print", CellChangeTimes->{3.6627183954917164`*^9, 3.6628915968620524`*^9, 3.662893135878312*^9, 3.662903868528776*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.635910913365307`", ",", "0.635910913365307`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.2059587577105328`", ",", "0.9837277382385043`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.9837277382385043`", ",", "0.2059587577105328`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.6934441382897193`", ",", "0.6934441382897193`"}], "}"}]}], "}"}], ",", "0.00007508676487928307`", ",", "300"}], "}"}]], "Print", CellChangeTimes->{3.6627183954917164`*^9, 3.6628915968620524`*^9, 3.662893135878312*^9, 3.662903871129989*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.6346333885524704`", ",", "0.6346333885524704`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.20719082232440927`", ",", "0.982907905869138`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.982907905869138`", ",", "0.20719082232440927`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.6922794060116821`", ",", "0.6922794060116821`"}], "}"}]}], "}"}], ",", "3.5524034923388416`*^-6", ",", "350"}], "}"}]], "Print", CellChangeTimes->{3.6627183954917164`*^9, 3.6628915968620524`*^9, 3.662893135878312*^9, 3.662903873716404*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.6343392688610745`", ",", "0.6343392688610745`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.20747246030582414`", ",", "0.9826988044049848`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.9826988044049848`", ",", "0.20747246030582414`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.6920064889478592`", ",", "0.6920064889478592`"}], "}"}]}], "}"}], ",", "2.2847251152631415`*^-9", ",", "400"}], "}"}]], "Print", CellChangeTimes->{3.6627183954917164`*^9, 3.6628915968620524`*^9, 3.662893135878312*^9, 3.662903876287417*^9}] }, Open ]], Cell[BoxData[ RowBox[{"{", RowBox[{"2.4970464662053916`*^-12", ",", RowBox[{"{", RowBox[{ RowBox[{"s00", "\[Rule]", "0.6343332134066221`"}], ",", RowBox[{"s01", "\[Rule]", "0.20747246030582414`"}], ",", RowBox[{"s10", "\[Rule]", "0.9826988044049848`"}], ",", RowBox[{"s11", "\[Rule]", "0.6920064889478592`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.6551482691182766`*^9, 3.655546038406337*^9, 3.655726051497878*^9, 3.655813002741887*^9, 3.6563592240421157`*^9, 3.6614286122872696`*^9, 3.6615595151689425`*^9, 3.6615615906799717`*^9, 3.661605630423231*^9, 3.661697471589308*^9, 3.661767817055393*^9, 3.6618603215873833`*^9, 3.661861401287252*^9, 3.6618633858843203`*^9, 3.661863869650315*^9, 3.6618650009934688`*^9, 3.6618651145145955`*^9, 3.6620159237989607`*^9, 3.6620174256825523`*^9, 3.6621232785582485`*^9, 3.6621966860764985`*^9, 3.662230344313275*^9, 3.6623826678344283`*^9, 3.662458645724456*^9, 3.6626639880705695`*^9, 3.662699812448284*^9, 3.662712701699295*^9, 3.6627127572954607`*^9, 3.66271777918428*^9, {3.662718380318433*^9, 3.662718409779677*^9}, 3.662891618597085*^9, 3.6628931576743436`*^9, 3.6629038773206224`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{"eqmBase", "\[IndentingNewLine]", RowBox[{"eqmCF", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "joint", " ", "CCPs", " ", "in", " ", "observed", " ", "equilibrium"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sigmaBase", "=", RowBox[{"sSymb", "/.", RowBox[{"eqmBase", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sigmaCF", "=", RowBox[{"sSymb", "/.", RowBox[{"eqmCF", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], ";"}]}], "Input", CellChangeTimes->{{3.6551481956777215`*^9, 3.655148201158616*^9}, { 3.661862053991493*^9, 3.6618620619551916`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"3.564451932092538`*^-14", ",", RowBox[{"{", RowBox[{ RowBox[{"s00", "\[Rule]", "0.5755707723508335`"}], ",", RowBox[{"s01", "\[Rule]", "0.3045078249811816`"}], ",", RowBox[{"s10", "\[Rule]", "0.8423118190204912`"}], ",", RowBox[{"s11", "\[Rule]", "0.5948104359862465`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.6551482507142353`*^9, 3.6551482738013525`*^9}, 3.6555460384375367`*^9, 3.65572605152588*^9, 3.6558130027779417`*^9, 3.65635922407714*^9, 3.6614286123192964`*^9, 3.6615595152029686`*^9, 3.6616056304700313`*^9, 3.661697471655342*^9, 3.6617678170753937`*^9, 3.661860321617891*^9, 3.6618614013172865`*^9, 3.661861508658015*^9, 3.6618620631471367`*^9, 3.6618633859113464`*^9, {3.661863869680823*^9, 3.6618638780099545`*^9}, 3.66186511453259*^9, 3.662015923830983*^9, { 3.662017442521103*^9, 3.6620174432568645`*^9}, 3.6621232785922756`*^9, 3.6621966860964985`*^9, 3.6622303443499994`*^9, 3.6623826678744287`*^9, 3.6624586457344556`*^9, 3.662663988101593*^9, 3.662699812481307*^9, 3.6627127017573366`*^9, 3.6627127573264875`*^9, 3.662718414092189*^9, 3.6628916186170855`*^9, 3.662893157704344*^9, 3.6629038773518224`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"2.4970464662053916`*^-12", ",", RowBox[{"{", RowBox[{ RowBox[{"s00", "\[Rule]", "0.6343332134066221`"}], ",", RowBox[{"s01", "\[Rule]", "0.20747246030582414`"}], ",", RowBox[{"s10", "\[Rule]", "0.9826988044049848`"}], ",", RowBox[{"s11", "\[Rule]", "0.6920064889478592`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.6551482507142353`*^9, 3.6551482738013525`*^9}, 3.6555460384375367`*^9, 3.65572605152588*^9, 3.6558130027779417`*^9, 3.65635922407714*^9, 3.6614286123192964`*^9, 3.6615595152029686`*^9, 3.6616056304700313`*^9, 3.661697471655342*^9, 3.6617678170753937`*^9, 3.661860321617891*^9, 3.6618614013172865`*^9, 3.661861508658015*^9, 3.6618620631471367`*^9, 3.6618633859113464`*^9, {3.661863869680823*^9, 3.6618638780099545`*^9}, 3.66186511453259*^9, 3.662015923830983*^9, { 3.662017442521103*^9, 3.6620174432568645`*^9}, 3.6621232785922756`*^9, 3.6621966860964985`*^9, 3.6622303443499994`*^9, 3.6623826678744287`*^9, 3.6624586457344556`*^9, 3.662663988101593*^9, 3.662699812481307*^9, 3.6627127017573366`*^9, 3.6627127573264875`*^9, 3.662718414092189*^9, 3.6628916186170855`*^9, 3.662893157704344*^9, 3.6629038773518224`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{"VBase", "\[IndentingNewLine]", "Vtemp"}], "Input", CellChangeTimes->{{3.6627126829200983`*^9, 3.6627126855731897`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2.920648796257558`", ",", "2.920648796257558`"}], "}"}], ",", RowBox[{"{", RowBox[{"2.516436011439205`", ",", "3.70449329935042`"}], "}"}], ",", RowBox[{"{", RowBox[{"3.704493299350418`", ",", "2.5164360114392035`"}], "}"}], ",", RowBox[{"{", RowBox[{"3.042536467971365`", ",", "3.042536467971365`"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.662712701735321*^9, 3.662712708667554*^9}, { 3.6627127406070037`*^9, 3.6627127573515267`*^9}, 3.662718415726215*^9, 3.662891618637085*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1.9730282445222922`", ",", "1.9730282445222924`"}], "}"}], ",", RowBox[{"{", RowBox[{"1.278330437352427`", ",", "3.8652282543897454`"}], "}"}], ",", RowBox[{"{", RowBox[{"3.865228254389745`", ",", "1.2783304373524265`"}], "}"}], ",", RowBox[{"{", RowBox[{"2.141929289980002`", ",", "2.141929289980002`"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.662712701735321*^9, 3.662712708667554*^9}, { 3.6627127406070037`*^9, 3.6627127573515267`*^9}, 3.662718415726215*^9, 3.662891618637085*^9}] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Recover primitives", "Section", CellChangeTimes->{{3.65502233822126*^9, 3.6550223645209208`*^9}, { 3.6551479669436274`*^9, 3.655147969351337*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"Hotz", "-", RowBox[{"Miller", " ", "with", " ", "normal", " ", "errors"}]}], ",", " ", RowBox[{"varia", ";", RowBox[{"nce", "=", "1"}]}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Clear", "[", "PhiNormal", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"PhiNormal", "[", RowBox[{"p_", "?", "NumericQ"}], "]"}], ":=", RowBox[{"InverseCDF", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", "1"}], "]"}], ",", "p"}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"Arcidiacono", "-", RowBox[{"Miller", " ", "with", " ", "normal", " ", "errors"}]}], ",", " ", RowBox[{"variance", "=", "1"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Clear", "[", "PsiNormal", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"PsiNormal", "[", RowBox[{ RowBox[{"p_", "?", "NumericQ"}], ",", "a_"}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"a", "\[Equal]", "1"}], ",", "\[IndentingNewLine]", RowBox[{"NIntegrate", "[", RowBox[{ RowBox[{ RowBox[{"Max", "[", RowBox[{"eps1", ",", RowBox[{"-", RowBox[{"PhiNormal", "[", "p", "]"}]}]}], "]"}], "*", RowBox[{"PDF", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", "1"}], "]"}], ",", "eps1"}], "]"}]}], ",", RowBox[{"{", RowBox[{"eps1", ",", RowBox[{"-", "\[Infinity]"}], ",", "\[Infinity]"}], "}"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"NIntegrate", "[", RowBox[{ RowBox[{ RowBox[{"Max", "[", RowBox[{ RowBox[{ RowBox[{"PhiNormal", "[", "p", "]"}], "+", "eps1"}], ",", "0"}], "]"}], "*", RowBox[{"PDF", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", "1"}], "]"}], ",", "eps1"}], "]"}]}], ",", RowBox[{"{", RowBox[{"eps1", ",", RowBox[{"-", "\[Infinity]"}], ",", "\[Infinity]"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "expected", " ", "error", " ", "term", " ", "added", " ", "to", " ", "action", " ", "1"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"EepsNormal", "[", "p_", "]"}], ":=", RowBox[{ RowBox[{"NIntegrate", "[", RowBox[{ RowBox[{"eps1", "*", RowBox[{"PDF", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", "1"}], "]"}], ",", "eps1"}], "]"}]}], ",", RowBox[{"{", RowBox[{"eps1", ",", RowBox[{"-", RowBox[{"PhiNormal", "[", "p", "]"}]}], ",", "\[Infinity]"}], "}"}]}], "]"}], "/", "p"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "convert", " ", "payoff", " ", "vector", " ", "to", " ", "array", " ", "indexed", " ", "by", " ", "own", " ", "action"}], ",", " ", RowBox[{"other", " ", "action"}], ",", " ", RowBox[{"own", " ", "state"}], ",", " ", RowBox[{"other", " ", "state"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Vec2Array", "[", "vec_", "]"}], ":=", RowBox[{"Partition", "[", RowBox[{ RowBox[{"Partition", "[", RowBox[{ RowBox[{"Partition", "[", RowBox[{"vec", ",", "2"}], "]"}], ",", "2"}], "]"}], ",", "2"}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "convert", " ", "payoff", " ", "array", " ", "to", " ", "vector"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Array2Vec", "[", "array_", "]"}], ":=", RowBox[{"Flatten", "[", "array", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"piSymbArray", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"ToExpression", "[", RowBox[{"\"\\"", "<>", RowBox[{"ToString", "[", "a1", "]"}], "<>", RowBox[{"ToString", "[", "a2", "]"}], "<>", RowBox[{"ToString", "[", "s1", "]"}], "<>", RowBox[{"ToString", "[", "s2", "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"a1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"a2", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s2", ",", "1", ",", "2"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"piSymbVec", "=", RowBox[{"Array2Vec", "[", "piSymbArray", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"true", " ", "values"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"truePi", "=", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"piSymbArray", "[", RowBox[{"[", "a1", "]"}], "]"}], "[", RowBox[{"[", "a2", "]"}], "]"}], "[", RowBox[{"[", "s1", "]"}], "]"}], "[", RowBox[{"[", "s2", "]"}], "]"}], "->", RowBox[{"pii", "[", RowBox[{ "a1", ",", "a2", ",", "s1", ",", "s2", ",", "basetheta", ",", "1"}], "]"}]}], ",", RowBox[{"{", RowBox[{"a1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"a2", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s2", ",", "1", ",", "2"}], "}"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Vec2Array", "[", "piSymbVec", "]"}], "\[Equal]", "piSymbArray"}], "\[IndentingNewLine]"}]}]], "Input", CellChangeTimes->{{3.6614285889700556`*^9, 3.661428696343004*^9}, { 3.661428727888796*^9, 3.66142874897277*^9}, {3.6614288895567503`*^9, 3.6614288926101074`*^9}, {3.6614294702275457`*^9, 3.661429489607478*^9}, { 3.6614295512688103`*^9, 3.661429588414487*^9}, {3.661429654194743*^9, 3.661429689615576*^9}, {3.6614348197410536`*^9, 3.661434878932545*^9}, { 3.661434921793767*^9, 3.661434923445423*^9}, {3.661434984317168*^9, 3.661435033573028*^9}, {3.661435067392662*^9, 3.661435071990698*^9}, { 3.6614355105443068`*^9, 3.661435511594973*^9}, {3.6615874066176066`*^9, 3.6615874095272217`*^9}, {3.661587441738391*^9, 3.6615874536712494`*^9}, 3.661588747393691*^9, {3.66160575181889*^9, 3.661605771436125*^9}, { 3.661606690616825*^9, 3.661606690804025*^9}, {3.661606934775324*^9, 3.6616069361023264`*^9}, {3.661609817761997*^9, 3.6616098213676033`*^9}, { 3.661610244636112*^9, 3.661610281451207*^9}, {3.6616110723317223`*^9, 3.6616110726291227`*^9}, {3.661861890526436*^9, 3.6618619104172664`*^9}, { 3.661862059888131*^9, 3.6618620675160093`*^9}, {3.661870474324849*^9, 3.66187050313389*^9}, {3.6623166007253*^9, 3.662316641983276*^9}, { 3.6623824177230206`*^9, 3.662382426011033*^9}, {3.662382472198102*^9, 3.6623824808241158`*^9}, {3.662386110374936*^9, 3.6623861119289455`*^9}, { 3.662713090172611*^9, 3.662713098512901*^9}, {3.6627187184193077`*^9, 3.6627187417303267`*^9}}], Cell[BoxData["True"], "Output", CellChangeTimes->{ 3.661560849148078*^9, {3.661587410211376*^9, 3.6615874550221553`*^9}, 3.6615887478861437`*^9, 3.661605637338043*^9, 3.6616057850141487`*^9, 3.661606980643012*^9, 3.6616098512178574`*^9, {3.661610259397152*^9, 3.6616102835134106`*^9}, 3.661611075520128*^9, 3.661697471683362*^9, 3.6617678171053934`*^9, 3.6618603216539145`*^9, 3.6618615100410805`*^9, 3.6618619166381645`*^9, 3.6618620689058666`*^9, {3.6618633859413714`*^9, 3.661863394759054*^9}, {3.661863879366072*^9, 3.661863887267346*^9}, 3.6618651423168707`*^9, {3.661870528766119*^9, 3.661870557633749*^9}, 3.662015923868996*^9, 3.6620174443374352`*^9, 3.662123278629341*^9, 3.6622032507611427`*^9, 3.662230344391029*^9, 3.6623166473285036`*^9, 3.662367463153841*^9, 3.6623824272610345`*^9, {3.662382478153111*^9, 3.662382481266116*^9}, 3.6623826679144287`*^9, 3.662458645764456*^9, 3.66266398813962*^9, 3.6626998198438835`*^9, 3.66271132962382*^9, 3.6627186353986115`*^9, {3.6627187198397655`*^9, 3.6627187438012896`*^9}, 3.662891618667085*^9, 3.6628931577343435`*^9, 3.6629038773830223`*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"transition", " ", "matrix"}], ",", " ", RowBox[{"integrated", " ", "over", " ", "actions"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"PM", "[", "sigma_", "]"}], ":=", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", "x", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ")"}], "*", RowBox[{"(", RowBox[{"1", "-", RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", "x", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", "x", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ")"}], "*", RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", "x", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", "x", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "*", RowBox[{"(", RowBox[{"1", "-", RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", "x", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", "x", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "*", RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", "x", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "\[IndentingNewLine]", "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "4"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"transition", " ", "matrix"}], ",", " ", RowBox[{"conditional", " ", "on", " ", "first", " ", "action"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"PM1", "[", "sigma_", "]"}], ":=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"(", RowBox[{"1", "-", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "&"}], ",", "sigma"}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"transition", " ", "matrix"}], ",", " ", RowBox[{"conditional", " ", "on", " ", "second", " ", "action"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"PM2", "[", "sigma_", "]"}], ":=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], ",", "0", ",", "0"}], "}"}], "&"}], ",", "sigma"}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Epi", "[", "sigma_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "piSymbArray", ",", "expectedFlowProfits", ",", "expectedFlowProfits1", ",", "expectedFlowProfits2", ",", "expectedShocks", ",", "Vsymb", ",", "cvDiff", ",", "transMat", ",", "transMat1", ",", "transMat2", ",", "stratMat", ",", "ownCCP", ",", "ccpOther"}], "}"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"transition", " ", "matrices"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"transMat", "=", RowBox[{"PM", "[", "sigma", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"transMat1", "=", RowBox[{"PM1", "[", "sigma", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"transMat2", "=", RowBox[{"PM2", "[", "sigma", "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "probability", " ", "of", " ", "pairs", " ", "of", " ", "actions"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"stratMat", "=", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"a1", "\[Equal]", "1"}], ",", RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", RowBox[{"s2x", "[", RowBox[{"{", RowBox[{"s1", ",", "s2"}], "}"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"1", "-", RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", RowBox[{"s2x", "[", RowBox[{"{", RowBox[{"s1", ",", "s2"}], "}"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "]"}], "*", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"a2", "\[Equal]", "1"}], ",", RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", RowBox[{"s2x", "[", RowBox[{"{", RowBox[{"s1", ",", "s2"}], "}"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}], ",", RowBox[{"1", "-", RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", RowBox[{"s2x", "[", RowBox[{"{", RowBox[{"s1", ",", "s2"}], "}"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"a1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"a2", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s2", ",", "1", ",", "2"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"other", " ", RowBox[{"player", "'"}], "s", " ", "strategy"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"ccpOther", "=", "\[IndentingNewLine]", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"a2", "\[Equal]", "1"}], ",", RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", RowBox[{"s2x", "[", RowBox[{"{", RowBox[{"s1", ",", "s2"}], "}"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}], ",", RowBox[{"1", "-", RowBox[{ RowBox[{"sigma", "[", RowBox[{"[", RowBox[{"s2x", "[", RowBox[{"{", RowBox[{"s1", ",", "s2"}], "}"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"a2", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s2", ",", "1", ",", "2"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"piSymbArray", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"ToExpression", "[", RowBox[{"\"\\"", "<>", RowBox[{"ToString", "[", "a1", "]"}], "<>", RowBox[{"ToString", "[", "a2", "]"}], "<>", RowBox[{"ToString", "[", "s1", "]"}], "<>", RowBox[{"ToString", "[", "s2", "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"a1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"a2", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s2", ",", "1", ",", "2"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "expected", " ", "flow", " ", "profits", " ", "for", " ", "each", " ", "state"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"expectedFlowProfits", "=", RowBox[{"Plus", "@@", RowBox[{"(", RowBox[{"Plus", "@@", RowBox[{"(", RowBox[{"piSymbArray", "*", "stratMat"}], ")"}]}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"expected", " ", "flow", " ", "profits"}], ",", " ", RowBox[{ RowBox[{"with", " ", "a"}], "=", "1"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"expectedFlowProfits1", "=", RowBox[{"Plus", "@@", RowBox[{"(", RowBox[{ RowBox[{"piSymbArray", "[", RowBox[{"[", "1", "]"}], "]"}], "*", "ccpOther"}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"expected", " ", "flow", " ", "profits"}], ",", " ", RowBox[{ RowBox[{"with", " ", "a"}], "=", "2"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"expectedFlowProfits2", "=", RowBox[{"Plus", "@@", RowBox[{"(", RowBox[{ RowBox[{"piSymbArray", "[", RowBox[{"[", "2", "]"}], "]"}], "*", "ccpOther"}], ")"}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"convert", " ", "from", " ", RowBox[{"(", RowBox[{"s1", ",", "s2"}], ")"}], " ", "to", " ", "x", " ", "indices"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"expectedFlowProfits", "=", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Extract", "[", RowBox[{"expectedFlowProfits", ",", RowBox[{"{", RowBox[{"x2s", "[", "x", "]"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "4"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"expectedFlowProfits1", "=", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Extract", "[", RowBox[{"expectedFlowProfits1", ",", RowBox[{"{", RowBox[{"x2s", "[", "x", "]"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "4"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"expectedFlowProfits2", "=", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Extract", "[", RowBox[{"expectedFlowProfits2", ",", RowBox[{"{", RowBox[{"x2s", "[", "x", "]"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "4"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ "expectedFlowProfits", ",", "expectedFlowProfits1", ",", "expectedFlowProfits2"}], "}"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"CVDiff", "[", "sigma_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "piSymbArray", ",", "expectedFlowProfits", ",", "expectedFlowProfits1", ",", "expectedFlowProfits2", ",", "expectedShocks", ",", "Vsymb", ",", "cvDiff", ",", "transMat", ",", "transMat1", ",", "transMat2", ",", "stratMat", ",", "ownCCP", ",", "ccpOther"}], "}"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"transition", " ", "matrices"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"transMat", "=", RowBox[{"PM", "[", "sigma", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"transMat1", "=", RowBox[{"PM1", "[", "sigma", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"transMat2", "=", RowBox[{"PM2", "[", "sigma", "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"individual", " ", RowBox[{"player", "'"}], "s", " ", RowBox[{"CCP", "'"}], "s", " ", "in", " ", "observed", " ", "equilibrium"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"ownCCP", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"1", "-", RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "}"}], "&"}], ",", "sigma"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "expected", " ", "error", " ", "terms", " ", "for", " ", "each", " ", "state"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"expectedLogit", "=", RowBox[{"Plus", "@@@", RowBox[{"(", RowBox[{"ownCCP", "*", RowBox[{"(", RowBox[{"EulerGamma", "-", RowBox[{"Log", "[", "sigmaBase", "]"}]}], ")"}]}], ")"}]}]}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"note", ":", " ", RowBox[{ "shock", " ", "only", " ", "to", " ", "first", " ", "action"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"expectedShocks", "=", RowBox[{"Plus", "@@@", RowBox[{"(", RowBox[{"ownCCP", "*", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{ RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"EepsNormal", "[", "#", "]"}], "&"}], ",", RowBox[{ RowBox[{"Transpose", "[", "sigma", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ",", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", "4", "}"}]}], "]"}]}], "}"}], "]"}]}], ")"}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"flow", " ", "profits"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ "expectedFlowProfits", ",", "expectedFlowProfits1", ",", "expectedFlowProfits2"}], "}"}], "=", RowBox[{"Epi", "[", "sigma", "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"ex", "-", RowBox[{ "ante", " ", "value", " ", "function", " ", "in", " ", "terms", " ", "of", " ", "utility", " ", "function"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Vsymb", "=", RowBox[{ RowBox[{"Inverse", "[", RowBox[{ RowBox[{"IdentityMatrix", "[", "4", "]"}], "-", RowBox[{"beta", "*", "transMat"}]}], "]"}], ".", RowBox[{"(", RowBox[{"expectedFlowProfits", "+", "expectedShocks"}], ")"}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"conditional", " ", "values", " ", "difference"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"expectedFlowProfits1", "-", "expectedFlowProfits2", "+", RowBox[{"beta", "*", RowBox[{ RowBox[{"(", RowBox[{"transMat1", "-", "transMat2"}], ")"}], ".", "Vsymb"}]}]}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]"}]}]], "Input", CellChangeTimes->{{3.6616108969279747`*^9, 3.661610913335647*^9}, { 3.661610943974924*^9, 3.661610980857213*^9}, {3.661611125281834*^9, 3.6616111420638647`*^9}, 3.661611202868577*^9, {3.661697801038269*^9, 3.6616978044381385`*^9}, {3.66169815998469*^9, 3.6616981642675686`*^9}, { 3.6616982264649787`*^9, 3.661698228577076*^9}, {3.661861906525326*^9, 3.6618620104698687`*^9}, {3.6618704800384912`*^9, 3.661870551661186*^9}, 3.6618706899855328`*^9, {3.661871048416258*^9, 3.661871059365394*^9}, { 3.6618710933487434`*^9, 3.66187113967374*^9}, {3.6618711953958664`*^9, 3.66187133633206*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"HM", " ", "inversion"}], " ", "*)"}], " ", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ownCCPBase", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"1", "-", RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "}"}], "&"}], ",", "sigmaBase"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"eqConditions", "=", RowBox[{ RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"Log", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "/", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "]"}], "&"}], ",", "ownCCP"}], "]"}], "-", "cvDiff"}]}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"PhiNormal", "[", RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "&"}], ",", "ownCCPBase"}], "]"}], "-", RowBox[{"(", RowBox[{ RowBox[{"CVDiff", "[", "sigmaBase", "]"}], "/.", "truePi"}], ")"}]}]}]}]], "Input", CellChangeTimes->{{3.6616978460536275`*^9, 3.661697858850625*^9}, { 3.661698221660657*^9, 3.6616982225953484`*^9}, {3.661861985972658*^9, 3.661861994118722*^9}, {3.6618620258191442`*^9, 3.6618620289657927`*^9}, { 3.661862077549055*^9, 3.6618620777622075`*^9}, {3.661870570495927*^9, 3.661870583248509*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"-", "9.620351834604968`*^-8"}], ",", "2.744459459691484`*^-8", ",", RowBox[{"-", "3.032542039704822`*^-8"}], ",", RowBox[{"-", "8.303195705994248`*^-8"}]}], "}"}]], "Output", CellChangeTimes->{{3.6616978524759684`*^9, 3.66169785941045*^9}, 3.66169822294648*^9, 3.661698822140727*^9, 3.6617678172153935`*^9, 3.6618603218210983`*^9, 3.6618615152138524`*^9, {3.661861933090981*^9, 3.6618619386916113`*^9}, {3.6618619952186375`*^9, 3.661862017772004*^9}, { 3.661862075359949*^9, 3.6618621031344404`*^9}, 3.661863235825836*^9, 3.661863398469731*^9, 3.6618638911849174`*^9, 3.661865147687167*^9, { 3.6618705609728155`*^9, 3.6618705841090565`*^9}, 3.661871346920244*^9, 3.6620159240411797`*^9, 3.6620174487713127`*^9, 3.6621232787574177`*^9, 3.6622032552081804`*^9, 3.66223034452563*^9, 3.6623826680344286`*^9, 3.6624586458244553`*^9, 3.662663994042539*^9, 3.6626998250075035`*^9, 3.6627186408854847`*^9, 3.662718752972332*^9, 3.6628916187670856`*^9, 3.6628931578243437`*^9, 3.662903877492223*^9}] }, Open ]], Cell[BoxData[""], "Input", CellChangeTimes->{{3.661698297548031*^9, 3.6616984202809696`*^9}, { 3.6618619697010098`*^9, 3.6618619804183006`*^9}, {3.6618621117066126`*^9, 3.6618621407245994`*^9}, {3.6618705870753164`*^9, 3.6618705876654634`*^9}, { 3.662317504422156*^9, 3.6623175085819817`*^9}, {3.662718791979317*^9, 3.662718794904705*^9}, {3.662718834231352*^9, 3.6627188607151937`*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ObjFn", "[", RowBox[{"theta_", ",", "sigma_", ",", "norm_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"piRep", ",", "cvDiff"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"cvDiff", "=", RowBox[{"CVDiff", "[", "sigma", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"piRep", "=", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"piSymbArray", "[", RowBox[{"[", "a1", "]"}], "]"}], "[", RowBox[{"[", "a2", "]"}], "]"}], "[", RowBox[{"[", "s1", "]"}], "]"}], "[", RowBox[{"[", "s2", "]"}], "]"}], "->", RowBox[{"pii", "[", RowBox[{ "a1", ",", "a2", ",", "s1", ",", "s2", ",", "theta", ",", "norm"}], "]"}]}], ",", RowBox[{"{", RowBox[{"a1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"a2", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s2", ",", "1", ",", "2"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"errs", "=", RowBox[{ RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"PhiNormal", "[", RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "&"}], ",", "ownCCPBase"}], "]"}], "-", RowBox[{"(", RowBox[{"cvDiff", "/.", "piRep"}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Plus", "@@", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"#", "^", "2"}], "&"}], ",", "errs"}], "]"}]}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"thetaSymb", "=", RowBox[{"{", RowBox[{"csymb", ",", "pi1symb", ",", "pi2symb"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"startingVals", "=", RowBox[{"{", RowBox[{ RowBox[{"-", ".15"}], ",", "1.1", ",", RowBox[{"-", "1.1"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"cons", "=", RowBox[{"{", RowBox[{ RowBox[{"pi1symb", "\[LessEqual]", "100"}], ",", RowBox[{"pi1symb", "\[GreaterEqual]", RowBox[{"-", "100"}]}], ",", RowBox[{"pi2symb", "\[LessEqual]", "100"}], ",", RowBox[{"pi2symb", "\[GreaterEqual]", RowBox[{"-", "100"}]}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"starter", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"thetaSymb", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"startingVals", "[", RowBox[{"[", "i", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"Length", "[", "thetaSymb", "]"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"FindMinimum", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ObjFn", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "csymb", ",", "pi1symb", ",", "pi2symb"}], "}"}], ",", "sigmaBase", ",", "1"}], "]"}], ",", "cons"}], "}"}], ",", "starter"}], "]"}]}], "Input", CellChangeTimes->{{3.6616986269563694`*^9, 3.6616986279609795`*^9}, { 3.661698754597395*^9, 3.661698764606984*^9}, {3.6616994359102726`*^9, 3.6616994363631124`*^9}, {3.661769939984168*^9, 3.661769942750326*^9}, { 3.661862146802782*^9, 3.6618621632977724`*^9}, {3.662718765366314*^9, 3.6627187781925907`*^9}, {3.662718811716654*^9, 3.662718879243598*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"8.028105535709977`*^-15", ",", RowBox[{"{", RowBox[{ RowBox[{"csymb", "\[Rule]", RowBox[{"-", "0.10000000769181772`"}]}], ",", RowBox[{"pi1symb", "\[Rule]", "1.189999927683608`"}], ",", RowBox[{"pi2symb", "\[Rule]", RowBox[{"-", "1.2099999707954165`"}]}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.6616987695727606`*^9, 3.661699447923465*^9, 3.6617001592351084`*^9, 3.661767986841467*^9, 3.661769951308816*^9, 3.6618603219943595`*^9, 3.6618615180344057`*^9, 3.6618620826079006`*^9, 3.6618621310525913`*^9, 3.661862181896425*^9, 3.661863054562697*^9, 3.6618632529331064`*^9, 3.6618634010493107`*^9, 3.661863893479644*^9, 3.6618651504005175`*^9, 3.661870591001532*^9, 3.661871361605714*^9, 3.6620159296891823`*^9, 3.6620174512467012`*^9, 3.6621232789015465`*^9, 3.662123327209347*^9, 3.6622032575451913`*^9, 3.662230344643902*^9, 3.662317512180565*^9, 3.662382668144429*^9, 3.6624586458844557`*^9, 3.6626639962883406`*^9, 3.6626998279819736`*^9, {3.662718855221837*^9, 3.662718879726796*^9}, 3.6628916188570857`*^9, 3.662893157904344*^9, 3.662903877585823*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"thetaSymb", "=", RowBox[{"{", RowBox[{"arg1", ",", "arg2", ",", "arg3", ",", "arg4"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"startingVals", "=", RowBox[{"{", RowBox[{ RowBox[{"-", ".15"}], ",", RowBox[{"-", ".5"}], ",", "2", ",", "1"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"starter", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"thetaSymb", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"startingVals", "[", RowBox[{"[", "i", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"Length", "[", "thetaSymb", "]"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"wrongrep", "=", RowBox[{"FindMinimum", "[", RowBox[{ RowBox[{"ObjFn", "[", RowBox[{ RowBox[{"{", RowBox[{"arg1", ",", "arg2", ",", "arg3", ",", "arg4", ",", "0"}], "}"}], ",", "sigmaBase", ",", "2"}], "]"}], ",", "starter"}], "]"}]}]}], "Input", CellChangeTimes->{ 3.6617699643965645`*^9, {3.661770038989831*^9, 3.6617700402679043`*^9}, { 3.661862186974331*^9, 3.6618621963015575`*^9}, {3.66186228791809*^9, 3.661862297634903*^9}, {3.6618627035097275`*^9, 3.6618627036224613`*^9}, { 3.6618630422615223`*^9, 3.6618630522096286`*^9}, {3.6627188865173793`*^9, 3.6627189190540934`*^9}, {3.662718958501929*^9, 3.662718961780068*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"3.143117669239969`*^-31", ",", RowBox[{"{", RowBox[{ RowBox[{"arg1", "\[Rule]", RowBox[{"-", "0.5062277791576244`"}]}], ",", RowBox[{"arg2", "\[Rule]", RowBox[{"-", "1.105942313240811`"}]}], ",", RowBox[{"arg3", "\[Rule]", "1.5079455013284082`"}], ",", RowBox[{"arg4", "\[Rule]", RowBox[{"-", "0.39936268352311544`"}]}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.6617699659336524`*^9, 3.661770041652983*^9, 3.661860322094438*^9, 3.6618615187476263`*^9, 3.661862214008217*^9, {3.661862704165655*^9, 3.6618627269610243`*^9}, 3.661863058183939*^9, 3.6618631477620554`*^9, 3.661863253576599*^9, 3.6618634027555046`*^9, 3.66186389437654*^9, 3.6618651540074596`*^9, 3.6618705921341376`*^9, 3.661871362911665*^9, 3.6620159312623663`*^9, 3.66201745189501*^9, 3.6621232790256414`*^9, 3.662123327731474*^9, 3.662203258154194*^9, 3.6622303447720747`*^9, 3.662382668254429*^9, 3.662458645944456*^9, 3.6626639970400577`*^9, 3.662699829201309*^9, {3.662718937711768*^9, 3.6627189628842554`*^9}, 3.662891619007086*^9, 3.662893157964344*^9, 3.662903877666625*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"alttheta", "=", RowBox[{ RowBox[{"{", RowBox[{"arg1", ",", "arg2", ",", "arg3", ",", "arg4", ",", "0"}], "}"}], "/.", RowBox[{"wrongrep", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sigmaWrongBase", "=", RowBox[{"SolveSymmetric", "[", RowBox[{"alttheta", ",", "2", ",", "50"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sigmaWrongCF", "=", RowBox[{"SolveSymmetric", "[", RowBox[{ RowBox[{"alttheta", "+", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "0", ",", RowBox[{"dpi", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], ",", "2", ",", "50"}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.6617700201897554`*^9, 3.661770083419372*^9}, { 3.6617701242047048`*^9, 3.6617701483810873`*^9}, {3.6618613635599604`*^9, 3.661861367649028*^9}, {3.6618616393573313`*^9, 3.661861639938219*^9}, { 3.6618622865903683`*^9, 3.6618622939739666`*^9}, {3.6618627352712307`*^9, 3.6618627353828125`*^9}, 3.661863095420535*^9, {3.661864311211971*^9, 3.6618643419424047`*^9}, {3.6618644047591906`*^9, 3.661864404956312*^9}, { 3.6627189771076317`*^9, 3.6627190396340885`*^9}, {3.6627191090272083`*^9, 3.6627191094890738`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.58`", ",", "0.58`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.3`", ",", "0.84`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.84`", ",", "0.3`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.59`", ",", "0.59`"}], "}"}]}], "}"}], ",", "0.0013925296458448164`", ",", "0"}], "}"}]], "Print", CellChangeTimes->{ 3.661770078021063*^9, 3.6617701529943514`*^9, 3.6618603221684914`*^9, 3.661861519351576*^9, 3.661862216095339*^9, {3.6618627068254647`*^9, 3.661862736360464*^9}, 3.6618630647163773`*^9, 3.661863097722262*^9, 3.661863411322839*^9, 3.6618638957235885`*^9, {3.6618643172195406`*^9, 3.661864342830241*^9}, 3.6618644059526615`*^9, 3.66186515530502*^9, 3.6618705933993845`*^9, 3.6618706402347393`*^9, 3.661871364090513*^9, 3.6620159329596615`*^9, 3.6620174526192803`*^9, 3.6622032588851986`*^9, 3.662230344851129*^9, 3.6623826683344293`*^9, 3.662458646004456*^9, 3.6626640001714067`*^9, 3.6626998316461687`*^9, 3.662719133537451*^9, 3.662891619117086*^9, 3.662893158044344*^9, 3.6629038777602253`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.5749118656904834`", ",", "0.5749118656904834`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.3041645641114333`", ",", "0.8410359418625496`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.8410359418625496`", ",", "0.3041645641114333`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.5944530192783577`", ",", "0.5944530192783577`"}], "}"}]}], "}"}], ",", "0.00003311387964937635`", ",", "50"}], "}"}]], "Print", CellChangeTimes->{ 3.661770078021063*^9, 3.6617701529943514`*^9, 3.6618603221684914`*^9, 3.661861519351576*^9, 3.661862216095339*^9, {3.6618627068254647`*^9, 3.661862736360464*^9}, 3.6618630647163773`*^9, 3.661863097722262*^9, 3.661863411322839*^9, 3.6618638957235885`*^9, {3.6618643172195406`*^9, 3.661864342830241*^9}, 3.6618644059526615`*^9, 3.66186515530502*^9, 3.6618705933993845`*^9, 3.6618706402347393`*^9, 3.661871364090513*^9, 3.6620159329596615`*^9, 3.6620174526192803`*^9, 3.6622032588851986`*^9, 3.662230344851129*^9, 3.6623826683344293`*^9, 3.662458646004456*^9, 3.6626640001714067`*^9, 3.6626998316461687`*^9, 3.662719133537451*^9, 3.662891619117086*^9, 3.662893158044344*^9, 3.6629038802954345`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.575557906183644`", ",", "0.575557906183644`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.30450164113132794`", ",", "0.8422983330330165`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.8422983330330165`", ",", "0.30450164113132794`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.5948047445794914`", ",", "0.5948047445794914`"}], "}"}]}], "}"}], ",", "4.478112800557047`*^-9", ",", "100"}], "}"}]], "Print", CellChangeTimes->{ 3.661770078021063*^9, 3.6617701529943514`*^9, 3.6618603221684914`*^9, 3.661861519351576*^9, 3.661862216095339*^9, {3.6618627068254647`*^9, 3.661862736360464*^9}, 3.6618630647163773`*^9, 3.661863097722262*^9, 3.661863411322839*^9, 3.6618638957235885`*^9, {3.6618643172195406`*^9, 3.661864342830241*^9}, 3.6618644059526615`*^9, 3.66186515530502*^9, 3.6618705933993845`*^9, 3.6618706402347393`*^9, 3.661871364090513*^9, 3.6620159329596615`*^9, 3.6620174526192803`*^9, 3.6622032588851986`*^9, 3.662230344851129*^9, 3.6623826683344293`*^9, 3.662458646004456*^9, 3.6626640001714067`*^9, 3.6626998316461687`*^9, 3.662719133537451*^9, 3.662891619117086*^9, 3.662893158044344*^9, 3.6629038828518476`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.58`", ",", "0.58`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.3`", ",", "0.84`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.84`", ",", "0.3`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.59`", ",", "0.59`"}], "}"}]}], "}"}], ",", "0.15355034620685437`", ",", "0"}], "}"}]], "Print", CellChangeTimes->{ 3.661770078021063*^9, 3.6617701529943514`*^9, 3.6618603221684914`*^9, 3.661861519351576*^9, 3.661862216095339*^9, {3.6618627068254647`*^9, 3.661862736360464*^9}, 3.6618630647163773`*^9, 3.661863097722262*^9, 3.661863411322839*^9, 3.6618638957235885`*^9, {3.6618643172195406`*^9, 3.661864342830241*^9}, 3.6618644059526615`*^9, 3.66186515530502*^9, 3.6618705933993845`*^9, 3.6618706402347393`*^9, 3.661871364090513*^9, 3.6620159329596615`*^9, 3.6620174526192803`*^9, 3.6622032588851986`*^9, 3.662230344851129*^9, 3.6623826683344293`*^9, 3.662458646004456*^9, 3.6626640001714067`*^9, 3.6626998316461687`*^9, 3.662719133537451*^9, 3.662891619117086*^9, 3.662893158044344*^9, 3.662903884884657*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.5101028293249015`", ",", "0.5101028293249015`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.24330212344625782`", ",", "0.8054617345451296`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.8054617345451296`", ",", "0.24330212344625782`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.5995333357181054`", ",", "0.5995333357181054`"}], "}"}]}], "}"}], ",", "0.022636876832660913`", ",", "50"}], "}"}]], "Print", CellChangeTimes->{ 3.661770078021063*^9, 3.6617701529943514`*^9, 3.6618603221684914`*^9, 3.661861519351576*^9, 3.661862216095339*^9, {3.6618627068254647`*^9, 3.661862736360464*^9}, 3.6618630647163773`*^9, 3.661863097722262*^9, 3.661863411322839*^9, 3.6618638957235885`*^9, {3.6618643172195406`*^9, 3.661864342830241*^9}, 3.6618644059526615`*^9, 3.66186515530502*^9, 3.6618705933993845`*^9, 3.6618706402347393`*^9, 3.661871364090513*^9, 3.6620159329596615`*^9, 3.6620174526192803`*^9, 3.6622032588851986`*^9, 3.662230344851129*^9, 3.6623826683344293`*^9, 3.662458646004456*^9, 3.6626640001714067`*^9, 3.6626998316461687`*^9, 3.662719133537451*^9, 3.662891619117086*^9, 3.662893158044344*^9, 3.662903887454468*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.5143350035721079`", ",", "0.5143350035721079`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.24120307611802266`", ",", "0.8338830982180925`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.8338830982180925`", ",", "0.24120307611802266`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.6113354087528761`", ",", "0.6113354087528761`"}], "}"}]}], "}"}], ",", "0.00015699520861405395`", ",", "100"}], "}"}]], "Print", CellChangeTimes->{ 3.661770078021063*^9, 3.6617701529943514`*^9, 3.6618603221684914`*^9, 3.661861519351576*^9, 3.661862216095339*^9, {3.6618627068254647`*^9, 3.661862736360464*^9}, 3.6618630647163773`*^9, 3.661863097722262*^9, 3.661863411322839*^9, 3.6618638957235885`*^9, {3.6618643172195406`*^9, 3.661864342830241*^9}, 3.6618644059526615`*^9, 3.66186515530502*^9, 3.6618705933993845`*^9, 3.6618706402347393`*^9, 3.661871364090513*^9, 3.6620159329596615`*^9, 3.6620174526192803`*^9, 3.6622032588851986`*^9, 3.662230344851129*^9, 3.6623826683344293`*^9, 3.662458646004456*^9, 3.6626640001714067`*^9, 3.6626998316461687`*^9, 3.662719133537451*^9, 3.662891619117086*^9, 3.662893158044344*^9, 3.6629038900056777`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.5161475574002132`", ",", "0.5161475574002132`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.24336525781974572`", ",", "0.8364992911483834`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.8364992911483834`", ",", "0.24336525781974572`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.6123784574219505`", ",", "0.6123784574219505`"}], "}"}]}], "}"}], ",", "6.833700782138959`*^-10", ",", "150"}], "}"}]], "Print", CellChangeTimes->{ 3.661770078021063*^9, 3.6617701529943514`*^9, 3.6618603221684914`*^9, 3.661861519351576*^9, 3.661862216095339*^9, {3.6618627068254647`*^9, 3.661862736360464*^9}, 3.6618630647163773`*^9, 3.661863097722262*^9, 3.661863411322839*^9, 3.6618638957235885`*^9, {3.6618643172195406`*^9, 3.661864342830241*^9}, 3.6618644059526615`*^9, 3.66186515530502*^9, 3.6618705933993845`*^9, 3.6618706402347393`*^9, 3.661871364090513*^9, 3.6620159329596615`*^9, 3.6620174526192803`*^9, 3.6622032588851986`*^9, 3.662230344851129*^9, 3.6623826683344293`*^9, 3.662458646004456*^9, 3.6626640001714067`*^9, 3.6626998316461687`*^9, 3.662719133537451*^9, 3.662891619117086*^9, 3.662893158044344*^9, 3.6629038925446887`*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{"eqmBase", "\[IndentingNewLine]", "eqmCF", \ "\[IndentingNewLine]", "sigmaWrongBase", "\[IndentingNewLine]", \ "sigmaWrongCF"}], "Input", CellChangeTimes->{{3.661770165365059*^9, 3.661770178090787*^9}, { 3.661863745265478*^9, 3.66186374625838*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"3.564451932092538`*^-14", ",", RowBox[{"{", RowBox[{ RowBox[{"s00", "\[Rule]", "0.5755707723508335`"}], ",", RowBox[{"s01", "\[Rule]", "0.3045078249811816`"}], ",", RowBox[{"s10", "\[Rule]", "0.8423118190204912`"}], ",", RowBox[{"s11", "\[Rule]", "0.5948104359862465`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.6617701938526883`*^9, 3.661860353158747*^9, 3.661862248580764*^9, { 3.6618631325892935`*^9, 3.6618631510287914`*^9}, 3.661863437527252*^9, 3.6618639264442997`*^9, 3.661864400828313*^9, 3.6618644370412493`*^9, 3.661865189461933*^9, 3.66187063159791*^9, 3.6618706750849614`*^9, 3.662015963879225*^9, 3.6620174826411147`*^9, 3.6620175220089593`*^9, 3.6622032925793867`*^9, 3.662230373685251*^9, 3.662382705946616*^9, 3.662458680458506*^9, 3.6626640296087437`*^9, 3.662699861557331*^9, 3.662719150062747*^9, 3.6628916352561097`*^9, 3.6628931738293676`*^9, 3.6628966373672047`*^9, 3.6629038935770926`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"2.4970464662053916`*^-12", ",", RowBox[{"{", RowBox[{ RowBox[{"s00", "\[Rule]", "0.6343332134066221`"}], ",", RowBox[{"s01", "\[Rule]", "0.20747246030582414`"}], ",", RowBox[{"s10", "\[Rule]", "0.9826988044049848`"}], ",", RowBox[{"s11", "\[Rule]", "0.6920064889478592`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.6617701938526883`*^9, 3.661860353158747*^9, 3.661862248580764*^9, { 3.6618631325892935`*^9, 3.6618631510287914`*^9}, 3.661863437527252*^9, 3.6618639264442997`*^9, 3.661864400828313*^9, 3.6618644370412493`*^9, 3.661865189461933*^9, 3.66187063159791*^9, 3.6618706750849614`*^9, 3.662015963879225*^9, 3.6620174826411147`*^9, 3.6620175220089593`*^9, 3.6622032925793867`*^9, 3.662230373685251*^9, 3.662382705946616*^9, 3.662458680458506*^9, 3.6626640296087437`*^9, 3.662699861557331*^9, 3.662719150062747*^9, 3.6628916352561097`*^9, 3.6628931738293676`*^9, 3.6628966373672047`*^9, 3.6629038935770926`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"9.790368194033354`*^-13", ",", RowBox[{"{", RowBox[{ RowBox[{"s00", "\[Rule]", "0.5755706218673038`"}], ",", RowBox[{"s01", "\[Rule]", "0.30450767705657517`"}], ",", RowBox[{"s10", "\[Rule]", "0.8423115954228004`"}], ",", RowBox[{"s11", "\[Rule]", "0.59481036502703`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.6617701938526883`*^9, 3.661860353158747*^9, 3.661862248580764*^9, { 3.6618631325892935`*^9, 3.6618631510287914`*^9}, 3.661863437527252*^9, 3.6618639264442997`*^9, 3.661864400828313*^9, 3.6618644370412493`*^9, 3.661865189461933*^9, 3.66187063159791*^9, 3.6618706750849614`*^9, 3.662015963879225*^9, 3.6620174826411147`*^9, 3.6620175220089593`*^9, 3.6622032925793867`*^9, 3.662230373685251*^9, 3.662382705946616*^9, 3.662458680458506*^9, 3.6626640296087437`*^9, 3.662699861557331*^9, 3.662719150062747*^9, 3.6628916352561097`*^9, 3.6628931738293676`*^9, 3.6628966373672047`*^9, 3.662903893592693*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"8.99224327920161`*^-11", ",", RowBox[{"{", RowBox[{ RowBox[{"s00", "\[Rule]", "0.5161415019457608`"}], ",", RowBox[{"s01", "\[Rule]", "0.24336525781974572`"}], ",", RowBox[{"s10", "\[Rule]", "0.8364992911483834`"}], ",", RowBox[{"s11", "\[Rule]", "0.6123784574219505`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.6617701938526883`*^9, 3.661860353158747*^9, 3.661862248580764*^9, { 3.6618631325892935`*^9, 3.6618631510287914`*^9}, 3.661863437527252*^9, 3.6618639264442997`*^9, 3.661864400828313*^9, 3.6618644370412493`*^9, 3.661865189461933*^9, 3.66187063159791*^9, 3.6618706750849614`*^9, 3.662015963879225*^9, 3.6620174826411147`*^9, 3.6620175220089593`*^9, 3.6622032925793867`*^9, 3.662230373685251*^9, 3.662382705946616*^9, 3.662458680458506*^9, 3.6626640296087437`*^9, 3.662699861557331*^9, 3.662719150062747*^9, 3.6628916352561097`*^9, 3.6628931738293676`*^9, 3.6628966373672047`*^9, 3.662903893592693*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "have", " ", "a", " ", "look", " ", "at", " ", "payoffs", " ", "for", " ", "alternative", " ", "normalization"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"pi", "[", RowBox[{ RowBox[{"{", RowBox[{"a1", ",", "a2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "s2"}], "}"}], ",", "alttheta", ",", "2"}], "]"}], ",", RowBox[{"{", RowBox[{"a1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"a2", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s2", ",", "1", ",", "2"}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"pi", "[", RowBox[{ RowBox[{"{", RowBox[{"a1", ",", "a2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "s2"}], "}"}], ",", "basetheta", ",", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"a1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"a2", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s2", ",", "1", ",", "2"}], "}"}]}], "]"}]}]}]], "Input", CellChangeTimes->{{3.6628920925846386`*^9, 3.662892107094713*^9}, { 3.6628922810186367`*^9, 3.6628922861056643`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "0.39936268352311544`"}], ",", RowBox[{"-", "0.39936268352311544`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1.5079455013284082`", ",", RowBox[{"-", "1.105942313240811`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1.105942313240811`"}], ",", "1.5079455013284082`"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "0.5062277791576244`"}], ",", RowBox[{"-", "0.5062277791576244`"}]}], "}"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.6628921021006904`*^9, 3.66289210816772*^9}, 3.6628922869586697`*^9, 3.6628966358352013`*^9, 3.6629038936082926`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1.2`"}], ",", RowBox[{"-", "1.2`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.2`"}], ",", RowBox[{"-", "1.4`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1.4`"}], ",", RowBox[{"-", "1.2`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.4`"}], ",", RowBox[{"-", "1.4`"}]}], "}"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1.2`", ",", "0.1`"}], "}"}], ",", RowBox[{"{", RowBox[{"1.2`", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1.`", ",", "0.1`"}], "}"}], ",", RowBox[{"{", RowBox[{"1.`", ",", "0"}], "}"}]}], "}"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.1`", ",", "1.2`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.1`", ",", "1.`"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1.2`"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1.`"}], "}"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.1`", ",", "0.1`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.1`", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0.1`"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.6628921021006904`*^9, 3.66289210816772*^9}, 3.6628922869586697`*^9, 3.6628966358352013`*^9, 3.662903893623893*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "make", " ", "sure", " ", "cf", " ", "makes", " ", "the", " ", "same", " ", "difference", " ", "in", " ", "payoffs", " ", "for", " ", "both", " ", "normalizations"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"pi", "[", RowBox[{ RowBox[{"{", RowBox[{"a1", ",", "a2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "s2"}], "}"}], ",", "basetheta", ",", "1"}], "]"}], "-", RowBox[{"pi", "[", RowBox[{ RowBox[{"{", RowBox[{"a1", ",", "a2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "s2"}], "}"}], ",", RowBox[{"basetheta", "+", "dpi"}], ",", "1"}], "]"}]}], ",", RowBox[{"{", RowBox[{"a1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"a2", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s2", ",", "1", ",", "2"}], "}"}]}], "]"}], "-", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"pi", "[", RowBox[{ RowBox[{"{", RowBox[{"a1", ",", "a2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "s2"}], "}"}], ",", "alttheta", ",", "2"}], "]"}], "-", RowBox[{"pi", "[", RowBox[{ RowBox[{"{", RowBox[{"a1", ",", "a2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "s2"}], "}"}], ",", RowBox[{"alttheta", "+", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "0", ",", RowBox[{"dpi", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], ",", "2"}], "]"}]}], ",", RowBox[{"{", RowBox[{"a1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"a2", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s1", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"s2", ",", "1", ",", "2"}], "}"}]}], "]"}]}], "\[IndentingNewLine]"}]}]], "Input", CellChangeTimes->{{3.6628916263090963`*^9, 3.662891630825103*^9}, { 3.662891666532156*^9, 3.662891675236169*^9}, {3.662891730215251*^9, 3.662891734619258*^9}, {3.6628917665013046`*^9, 3.662891766981305*^9}, { 3.6628918158143787`*^9, 3.662891824599391*^9}, {3.662891862729448*^9, 3.662891899672502*^9}, {3.6628919754760027`*^9, 3.662892080773574*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.`", ",", "0.`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.`", ",", "0.`"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.`", ",", "0.`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.`", ",", "0.`"}], "}"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.`", ",", "0.`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.`", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.`", ",", "0.`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.`", ",", "0"}], "}"}]}], "}"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.`", ",", "0.`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.`", ",", "0.`"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0.`"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0.`"}], "}"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.`", ",", "0.`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.`", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0.`"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.662891725831244*^9, 3.6628917351092587`*^9}, { 3.662891767651306*^9, 3.6628917694313087`*^9}, 3.6628918250343924`*^9, 3.6628919006225033`*^9, 3.6628919480908537`*^9, {3.6628920342653365`*^9, 3.6628920822405825`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "are", " ", "the", " ", "counterfactual", " ", "equilibria", " ", "the", " ", RowBox[{"same", "?"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(", RowBox[{"sSymb", "/.", RowBox[{"eqmCF", "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}], "-", RowBox[{"(", RowBox[{"sSymb", "/.", RowBox[{"sigmaWrongCF", "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}]}]}]], "Input", CellChangeTimes->{{3.6618637177639074`*^9, 3.6618637578652525`*^9}, { 3.66186419157813*^9, 3.6618642010693398`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.11819171146086127`", ",", "0.11819171146086127`"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "0.035892797513921576`"}], ",", "0.1461995132566014`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.1461995132566014`", ",", RowBox[{"-", "0.035892797513921576`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"0.0796280315259087`", ",", "0.0796280315259087`"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.661863725321762*^9, 3.6618637589839535`*^9}, 3.6618639353496065`*^9, 3.6618641718801284`*^9, 3.6618642041653657`*^9, 3.6618644371413546`*^9, 3.6618651921887474`*^9, 3.6618708069727025`*^9, { 3.6620159639077625`*^9, 3.662015980253078*^9}, 3.6620174826717124`*^9, 3.662017524207061*^9, 3.662203292599386*^9, 3.662230373717274*^9, 3.662382705966617*^9, 3.662458680458506*^9, 3.6626640360673294`*^9, 3.662699861596421*^9, 3.6629038971943073`*^9}] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Table formatting functions", "Section", CellChangeTimes->{{3.645130030689745*^9, 3.645130031689432*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"NormalNumber", "[", "x_", "]"}], ":=", RowBox[{"ToString", "[", RowBox[{"x", ",", "InputForm"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"tableFormat", "[", RowBox[{"x_", ",", "dig_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "str", "}"}], ",", "\[IndentingNewLine]", RowBox[{"Switch", "[", RowBox[{"x", ",", "\[IndentingNewLine]", RowBox[{"_", "?", "NumberQ"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Round", "[", "x", "]"}], "\[Equal]", "x"}], ",", "\[IndentingNewLine]", RowBox[{"NormalNumber", "[", RowBox[{"Round", "@", "x"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"str", "=", RowBox[{"ToString", "[", RowBox[{"NumberForm", "[", RowBox[{"x", ",", "dig"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Last", "[", RowBox[{"Characters", "[", "str", "]"}], "]"}], "\[Equal]", "\"\<.\>\""}], ",", "\[IndentingNewLine]", RowBox[{"StringJoin", "@", RowBox[{"Drop", "[", RowBox[{ RowBox[{"Characters", "[", "str", "]"}], ",", RowBox[{"-", "1"}]}], "]"}]}], ",", "\[IndentingNewLine]", "str"}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", "_", ",", RowBox[{"ToString", "[", "x", "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"FormatNumbers", "[", RowBox[{"inMat_", ",", "format_"}], "]"}], ":=", RowBox[{"Map", "[", "\n", RowBox[{ RowBox[{ RowBox[{"Switch", "[", RowBox[{"#", ",", "\n", RowBox[{"_", "?", "NumberQ"}], ",", RowBox[{"Integerise", "[", RowBox[{"NumberForm", "[", RowBox[{"#", ",", "format"}], "]"}], "]"}], ",", "\n", "Null", ",", "\"\<\>\"", ",", "\n", "_", ",", RowBox[{"ToString", "[", "#", "]"}]}], "\n", "]"}], "&"}], ",", "\n", "inMat", ",", RowBox[{"{", "2", "}"}]}], "]"}]}], ";"}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"SmallRow", "[", "row_", "]"}], ":=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"\"\<\\\\small{\>\"", "<>", "#", "<>", "\"\<}\>\""}], "&"}], ",", "row"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ItalicRow", "[", "row_", "]"}], ":=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"#", "!=", "\"\<\>\""}], ",", RowBox[{"\"\<\\\\emph{\>\"", "<>", "#", "<>", "\"\<}\>\""}], ",", "\"\<\>\""}], "]"}], "&"}], ",", "row"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"AddParens", "[", RowBox[{"row_", "?", "VectorQ"}], "]"}], ":=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"#", "!=", "\"\<\>\""}], ",", RowBox[{"\"\<(\>\"", "<>", RowBox[{"ToString", "[", "#", "]"}], "<>", "\"\<)\>\""}], ",", "\"\<\>\""}], "]"}], "&"}], ",", "row"}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AddParens", "[", RowBox[{"num_", "?", "NumberQ"}], "]"}], ":=", RowBox[{"\"\<(\>\"", "<>", RowBox[{"ToString", "[", "num", "]"}], "<>", "\"\<)\>\""}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"AddParens", "[", RowBox[{"num_", "?", "StringQ"}], "]"}], ":=", RowBox[{"\"\<(\>\"", "<>", "num", "<>", "\"\<)\>\""}]}], ";"}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"AddParens", "[", RowBox[{"inMat_", ",", "rows_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", "row", ",", "outMat"}], "}"}], ",", "\n", RowBox[{ RowBox[{"outMat", "=", "inMat"}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "<=", RowBox[{"Length", "[", "rows", "]"}]}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{ RowBox[{"row", "=", RowBox[{"rows", "[", RowBox[{"[", "i", "]"}], "]"}]}], ";", "\n", RowBox[{"outMat", "=", RowBox[{"ReplacePart", "[", RowBox[{"outMat", ",", RowBox[{"row", "->", "\n", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"#", "!=", "\"\<\>\""}], ",", RowBox[{"\"\<(\>\"", "<>", RowBox[{"ToString", "[", "#", "]"}], "<>", "\"\<)\>\""}], ",", "\"\<\>\""}], "]"}], "&"}], ",", RowBox[{"outMat", "[", RowBox[{"[", "row", "]"}], "]"}]}], "]"}]}]}], "\n", "]"}]}], ";"}]}], "\n", "]"}], ";", "\n", "outMat"}]}], "\n", "]"}]}], ";"}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"AddCol", "[", RowBox[{"inMat_", ",", RowBox[{"posList_", "?", "ArrayQ"}]}], "]"}], ":=", RowBox[{"Transpose", "[", RowBox[{"Insert", "[", RowBox[{ RowBox[{"Transpose", "[", "inMat", "]"}], ",", RowBox[{"Table", "[", RowBox[{"\"\< \>\"", ",", RowBox[{"{", RowBox[{"Length", "[", "inMat", "]"}], "}"}]}], "]"}], ",", "posList"}], "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"AddCol", "[", RowBox[{"inMat_", ",", "col_", ",", RowBox[{"posList_", "?", "ArrayQ"}]}], "]"}], ":=", RowBox[{"Transpose", "[", RowBox[{"Insert", "[", RowBox[{ RowBox[{"Transpose", "[", "inMat", "]"}], ",", "col", ",", "posList"}], "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"AddCol", "[", RowBox[{"inMat_", ",", "pos_"}], "]"}], ":=", RowBox[{"Transpose", "[", RowBox[{"Insert", "[", RowBox[{ RowBox[{"Transpose", "[", "inMat", "]"}], ",", RowBox[{"Table", "[", RowBox[{"\"\< \>\"", ",", RowBox[{"{", RowBox[{"Length", "[", "inMat", "]"}], "}"}]}], "]"}], ",", "pos"}], "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"AddCol", "[", RowBox[{"inMat_", ",", "col_", ",", "pos_"}], "]"}], ":=", RowBox[{"Transpose", "[", RowBox[{"Insert", "[", RowBox[{ RowBox[{"Transpose", "[", "inMat", "]"}], ",", "col", ",", "pos"}], "]"}], "]"}]}], ";"}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"AddRow", "[", RowBox[{"inMat_", ",", RowBox[{"posList_", "?", "ArrayQ"}]}], "]"}], ":=", RowBox[{"Insert", "[", RowBox[{"inMat", ",", RowBox[{"Table", "[", RowBox[{"\"\< \>\"", ",", RowBox[{"{", RowBox[{"Length", "[", RowBox[{"inMat", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "}"}]}], "]"}], ",", "posList"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"AddRow", "[", RowBox[{"inMat_", ",", "row_", ",", RowBox[{"posList_", "?", "ArrayQ"}]}], "]"}], ":=", RowBox[{"Insert", "[", RowBox[{"inMat", ",", "row", ",", "posList"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"AddRow", "[", RowBox[{"inMat_", ",", "pos_"}], "]"}], ":=", RowBox[{"Insert", "[", RowBox[{"inMat", ",", RowBox[{"Table", "[", RowBox[{"\"\< \>\"", ",", RowBox[{"{", RowBox[{"Length", "[", RowBox[{"inMat", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "}"}]}], "]"}], ",", "pos"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"AddRow", "[", RowBox[{"inMat_", ",", "row_", ",", "pos_"}], "]"}], ":=", RowBox[{"Insert", "[", RowBox[{"inMat", ",", "row", ",", "pos"}], "]"}]}], ";"}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", " ", "^", "yy_"}], "]"}], ":=", RowBox[{"\"\<$\>\"", "<>", RowBox[{"ToTex", "[", "xx", "]"}], "<>", "\"\<^{\>\"", "<>", RowBox[{"ToTex", "[", "yy", "]"}], "<>", "\"\<}$\>\""}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"Subscript", "[", RowBox[{"xx_", ",", " ", "yy_"}], "]"}], " ", "]"}], ":=", RowBox[{"\"\<$\>\"", "<>", RowBox[{"ToTex", "[", "xx", "]"}], "<>", "\"\<_{\>\"", "<>", RowBox[{"ToTex", "[", "yy", "]"}], "<>", "\"\<}$\>\""}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Alpha]"}], "||", RowBox[{"#", "==", "\"\<\[Alpha]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\alpha$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Beta]"}], "||", RowBox[{"#", "==", "\"\<\[Beta]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\beta$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Gamma]"}], "||", RowBox[{"#", "==", "\"\<\[Gamma]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\gamma$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Delta]"}], "||", RowBox[{"#", "==", "\"\<\[Delta]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\delta$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Epsilon]"}], "||", RowBox[{"#", "==", "\"\<\[Epsilon]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\varepsilon$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Zeta]"}], "||", RowBox[{"#", "==", "\"\<\[Zeta]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\zeta$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Eta]"}], "||", RowBox[{"#", "==", "\"\<\[Eta]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\eta$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Theta]"}], "||", RowBox[{"#", "==", "\"\<\[Theta]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\theta$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Kappa]"}], "||", RowBox[{"#", "==", "\"\<\[Kappa]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\kappa$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Lambda]"}], "||", RowBox[{"#", "==", "\"\<\[Lambda]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\lambda$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Mu]"}], "||", RowBox[{"#", "==", "\"\<\[Mu]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\mu$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Nu]"}], "||", RowBox[{"#", "==", "\"\<\[Nu]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\nu$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Xi]"}], "||", RowBox[{"#", "==", "\"\<\[Xi]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\xi$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Pi]"}], "||", RowBox[{"#", "==", "\"\<\[Pi]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\pi$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Rho]"}], "||", RowBox[{"#", "==", "\"\<\[Rho]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\rho$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Sigma]"}], "||", RowBox[{"#", "==", "\"\<\[Sigma]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\sigma$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Tau]"}], "||", RowBox[{"#", "==", "\"\<\[Tau]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\tau$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Phi]"}], "||", RowBox[{"#", "==", "\"\<\[Phi]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\phi$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[CurlyPhi]"}], "||", RowBox[{"#", "==", "\"\<\[CurlyPhi]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\varphi$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Chi]"}], "||", RowBox[{"#", "==", "\"\<\[Chi]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\xi$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Psi]"}], "||", RowBox[{"#", "==", "\"\<\[Psi]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\psi$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"#", "==", "\[Omega]"}], "||", RowBox[{"#", "==", "\"\<\[Omega]\>\""}]}], "&"}], ")"}]}], "]"}], ":=", "\"\<$\\\\omega$\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", "Null", "]"}], ":=", "\"\<\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", "NumberQ"}], "]"}], ":=", RowBox[{"ToString", "[", "xx", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"xx_", "?", "AtomQ"}], "]"}], ":=", RowBox[{"ToString", "[", "xx", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ToTex", "[", "xx_", "]"}], ":=", RowBox[{"ToString", "[", "xx", "]"}]}], ";"}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"TexRow", "[", "list_", "]"}], ":=", RowBox[{"StringJoin", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"ToTex", "[", RowBox[{"list", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "<>", "\"\< & \>\""}], ",", "\n", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{ RowBox[{"Length", "[", "list", "]"}], "-", "1"}]}], "}"}]}], "]"}], "<>", RowBox[{"ToTex", "[", RowBox[{"list", "[", RowBox[{"[", RowBox[{"Length", "[", "list", "]"}], "]"}], "]"}], "]"}], "<>", "\"\< \\\\\\\\ \\n\>\""}], "]"}]}], ";"}], "\n"}], "\n", RowBox[{ RowBox[{"Table2Tex", "[", "mat_", "]"}], ":=", RowBox[{"StringJoin", "[", RowBox[{"TexRow", "/@", "mat"}], "]"}]}], "\n"}], "Input", CellChangeTimes->{{3.6478414878408346`*^9, 3.6478414899033613`*^9}, { 3.6478416558295474`*^9, 3.6478416566108093`*^9}, {3.64784182420004*^9, 3.6478418248250475`*^9}, {3.64784191731133*^9, 3.6478419801788197`*^9}, 3.647842061647271*^9, {3.6478423990211287`*^9, 3.647842503246194*^9}, { 3.647842547584738*^9, 3.6478425513019223`*^9}, {3.6478425835620975`*^9, 3.647842608638517*^9}, {3.6478426826290665`*^9, 3.6478427233275948`*^9}, { 3.647842774343278*^9, 3.6478427748120055`*^9}, {3.6478428083754854`*^9, 3.6478428134390893`*^9}, {3.6478433329135323`*^9, 3.647843394868618*^9}}], Cell[BoxData[""], "Input", CellChangeTimes->{{3.645171058723894*^9, 3.6451710597554965`*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Tables", "Section", CellChangeTimes->{{3.65502233822126*^9, 3.6550223487305384`*^9}, { 3.662896652500226*^9, 3.6628966531452274`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"table", " ", "of", " ", "CCPs"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"pTableData", "=", RowBox[{"Transpose", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Transpose", "[", "sSymb", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "/.", RowBox[{"eqmBase", "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"BR", "[", RowBox[{"sigmaBase", ",", RowBox[{"basetheta", "+", "dpi"}], ",", "1"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"BR", "[", RowBox[{"sigmaBase", ",", RowBox[{"alttheta", "+", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "0", ",", RowBox[{"dpi", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], ",", "2"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Transpose", "[", "sSymb", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "/.", RowBox[{"eqmCF", "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Transpose", "[", "sSymb", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "/.", RowBox[{"sigmaWrongCF", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "\[IndentingNewLine]", "}"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"pTableData", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"tableFormat", "[", RowBox[{"#", ",", "3"}], "]"}], "&"}], ",", "pTableData", ",", RowBox[{"{", "2", "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"pTableData", "//", "MatrixForm"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"collabels1", "=", RowBox[{"{", RowBox[{ "\"\<\\\\multicolumn{2}{c}{$P \\\\left( \\\\mbox{active} | \ s_{i},s_{i}\\\\right)$}\>\"", ",", "\"\\"", ",", "\"\<\\\\multicolumn{2}{c}{CF -- fixed opponent}\>\"", ",", "\"\< \>\"", " ", ",", "\"\<\\\\multicolumn{2}{c}{CF -- equilibrium}\>\""}], " ", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"collabels2", "=", RowBox[{"{", RowBox[{ "\"\< \>\"", ",", "\"\< \>\"", ",", "\"\< \>\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\< \>\"", " ", ",", "\"\\"", ",", "\"\\""}], " ", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"collabels3", "=", RowBox[{"{", RowBox[{ "\"\<$s_{i}$\>\"", ",", "\"\<$s_{-i}$\>\"", ",", "\"\< \>\"", ",", "\"\< \>\"", ",", "\"\< \>\"", ",", "\"\< \>\"", ",", "\"\< \>\"", " ", ",", "\"\< \>\""}], " ", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"rowlabels1", "=", RowBox[{"ToString", "/@", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1", ",", "1"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"rowlabels2", "=", RowBox[{"ToString", "/@", RowBox[{"{", RowBox[{"0", ",", "1", ",", "0", ",", "1"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"pTable", "=", RowBox[{"Transpose", "[", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"rowlabels1", ",", "rowlabels2"}], "}"}], ",", RowBox[{"Transpose", "[", "pTableData", "]"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"pTable", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"Insert", "[", RowBox[{"#", ",", "\"\< \>\"", ",", "6"}], "]"}], "&"}], ",", "pTable"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"pTable", "=", "\[IndentingNewLine]", RowBox[{ "\"\<\\\\begin{tabular}{cccccccc}\\n\>\"", "<>", "\n", "\"\<\\\\hline \\\\hline \\n\>\"", "<>", "\[IndentingNewLine]", RowBox[{"TexRow", "[", "collabels1", "]"}], "<>", "\"\<\\\\cline{4-5} \\\\cline{7-8} \>\"", "<>", "\[IndentingNewLine]", RowBox[{"TexRow", "[", "collabels2", "]"}], "<>", "\"\<\\\\hline \>\"", "<>", "\[IndentingNewLine]", RowBox[{"TexRow", "[", "collabels3", "]"}], "<>", "\"\<\\\\cline{1-2} \>\"", "<>", "\[IndentingNewLine]", RowBox[{"Table2Tex", "[", "pTable", "]"}], "<>", "\"\< \\\\hline \\\\\\\\ \\n\>\"", "<>", " ", "\[IndentingNewLine]", "\"\< \\\\end{tabular} \>\""}]}], "\[IndentingNewLine]", RowBox[{"Export", "[", RowBox[{ "\"\\"", ",", "pTable", ",", "\"\\""}], "]"}]}]}]], "Input", CellChangeTimes->CompressedData[" 1:eJxTTMoPSmViYGAQB2IQ7Sx05WC212vHHSrCh0C0maz1SRD9XvTyJRB9evF8 oxwgvaTzjj2IPpV1zRVEL5hzNAREX478GwWiA5hmJYDoljjhNBCtquMDpiV+ iBWBaLM305pAtM3anjYQ/e+53SIQ/ePgnTUgep3xmS0gOk7O8RyIvrNG9jyI LvkSfBNEi/UtBdMrhCPvgegGHcaHIDrqT98LEF2QuvQtiNY2nvsRREuxNfwG 0RaiZxlygfQLw89g+nT7Rn4QzVHmJgaiZ3UGyYDoNL94MC1RsFsTRHdd5NEC 0a8mhwWCaAGWg2D6xO7b8flAuq/nUhaI3sYsng+i+Xb7FoLoNlGtChCdtYKx AURfndrSCaLnnT0DpgH+erGO "]], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"\<\"0.576\"\>", "\<\"0.527\"\>", "\<\"0.527\"\>", "\<\"0.634\"\>", "\<\ \"0.516\"\>"}, {"\<\"0.305\"\>", "\<\"0.257\"\>", "\<\"0.257\"\>", "\<\"0.207\"\>", "\<\ \"0.243\"\>"}, {"\<\"0.842\"\>", "\<\"0.875\"\>", "\<\"0.875\"\>", "\<\"0.983\"\>", "\<\ \"0.836\"\>"}, {"\<\"0.595\"\>", "\<\"0.643\"\>", "\<\"0.643\"\>", "\<\"0.692\"\>", "\<\ \"0.612\"\>"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{{3.662896752224371*^9, 3.6628967668123927`*^9}, 3.6628974883708196`*^9, {3.662897759282315*^9, 3.662897801041703*^9}, { 3.66289812425219*^9, 3.662898126313308*^9}, {3.6628981650535235`*^9, 3.66289818963993*^9}, 3.662898238141704*^9, 3.662898280299115*^9, 3.6628984605924273`*^9, {3.662898569853677*^9, 3.6628985990193453`*^9}, 3.662898810849461*^9, 3.662898898054601*^9, {3.6628989402716646`*^9, 3.662898952626683*^9}, 3.6628990211298003`*^9, 3.662899053661661*^9, { 3.66289910713253*^9, 3.662899121557081*^9}, 3.662899165885853*^9, 3.662899208149843*^9, 3.6628993790019093`*^9, 3.662899429198447*^9, 3.662899537418637*^9, 3.662899881649326*^9, 3.6629042403892527`*^9, 3.6629043208436127`*^9, 3.6629044003083076`*^9}], Cell[BoxData["\<\"\\\\begin{tabular}{cccccccc}\\n\\\\hline \\\\hline \ \\n\\\\multicolumn{2}{c}{$P \\\\left( \\\\mbox{active} | \ s_{i},s_{i}\\\\right)$} & Baseline & \\\\multicolumn{2}{c}{CF -- fixed \ opponent} & & \\\\multicolumn{2}{c}{CF -- equilibrium} \\\\\\\\ \ \\n\\\\cline{4-5} \\\\cline{7-8} & & & Model 1 & Model 2 & & Model 1 \ & Model 2 \\\\\\\\ \\n\\\\hline $s_{i}$ & $s_{-i}$ & & & & & & \\\ \\\\\\ \\n\\\\cline{1-2} 0 & 0 & 0.576 & 0.527 & 0.527 & & 0.634 & 0.516 \\\ \\\\\\ \\n0 & 1 & 0.305 & 0.257 & 0.257 & & 0.207 & 0.243 \\\\\\\\ \\n1 & 0 \ & 0.842 & 0.875 & 0.875 & & 0.983 & 0.836 \\\\\\\\ \\n1 & 1 & 0.595 & 0.643 \ & 0.643 & & 0.692 & 0.612 \\\\\\\\ \\n \\\\hline \\\\\\\\ \\n \ \\\\end{tabular} \"\>"], "Output", CellChangeTimes->{{3.662896752224371*^9, 3.6628967668123927`*^9}, 3.6628974883708196`*^9, {3.662897759282315*^9, 3.662897801041703*^9}, { 3.66289812425219*^9, 3.662898126313308*^9}, {3.6628981650535235`*^9, 3.66289818963993*^9}, 3.662898238141704*^9, 3.662898280299115*^9, 3.6628984605924273`*^9, {3.662898569853677*^9, 3.6628985990193453`*^9}, 3.662898810849461*^9, 3.662898898054601*^9, {3.6628989402716646`*^9, 3.662898952626683*^9}, 3.6628990211298003`*^9, 3.662899053661661*^9, { 3.66289910713253*^9, 3.662899121557081*^9}, 3.662899165885853*^9, 3.662899208149843*^9, 3.6628993790019093`*^9, 3.662899429198447*^9, 3.662899537418637*^9, 3.662899881649326*^9, 3.6629042403892527`*^9, 3.6629043208436127`*^9, 3.6629044003083076`*^9}], Cell[BoxData["\<\"F:/Dropbox/land_values/IJIO/pTable.tex\"\>"], "Output", CellChangeTimes->{{3.662896752224371*^9, 3.6628967668123927`*^9}, 3.6628974883708196`*^9, {3.662897759282315*^9, 3.662897801041703*^9}, { 3.66289812425219*^9, 3.662898126313308*^9}, {3.6628981650535235`*^9, 3.66289818963993*^9}, 3.662898238141704*^9, 3.662898280299115*^9, 3.6628984605924273`*^9, {3.662898569853677*^9, 3.6628985990193453`*^9}, 3.662898810849461*^9, 3.662898898054601*^9, {3.6628989402716646`*^9, 3.662898952626683*^9}, 3.6628990211298003`*^9, 3.662899053661661*^9, { 3.66289910713253*^9, 3.662899121557081*^9}, 3.662899165885853*^9, 3.662899208149843*^9, 3.6628993790019093`*^9, 3.662899429198447*^9, 3.662899537418637*^9, 3.662899881649326*^9, 3.6629042403892527`*^9, 3.6629043208436127`*^9, 3.662904400323908*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"table", " ", "of", " ", "payoffs"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"uTableData", "=", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Flatten", "[", "\[IndentingNewLine]", RowBox[{"Join", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"pii", "[", RowBox[{ "a1", ",", "a2", ",", "s1", ",", "s2", ",", "basetheta", ",", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"a1", ",", "2", ",", "1", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"a2", ",", "2", ",", "1", ",", RowBox[{"-", "1"}]}], "}"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"pii", "[", RowBox[{ "a1", ",", "a2", ",", "s1", ",", "s2", ",", "alttheta", ",", "2"}], "]"}], ",", RowBox[{"{", RowBox[{"a1", ",", "2", ",", "1", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"a2", ",", "2", ",", "1", ",", RowBox[{"-", "1"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", "]"}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"s1", ",", "2", ",", "1", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"s2", ",", "2", ",", "1", ",", RowBox[{"-", "1"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"uTableData", "=", RowBox[{"Flatten", "[", RowBox[{"uTableData", ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"uTableData", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"tableFormat", "[", RowBox[{"#", ",", "3"}], "]"}], "&"}], ",", "uTableData", ",", RowBox[{"{", "2", "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"uTableData", "//", "MatrixForm"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"collabels1", "=", RowBox[{"{", RowBox[{ "\"\<\\\\multicolumn{2}{c}{$\\\\pi \ \\\\left(a_{i},a_{i},s_{i},s_{-i}\\\\right)$}\>\"", ",", "\"\<\\\\multicolumn{4}{c}{Model 1}\>\"", ",", "\"\< \>\"", ",", "\"\<\\\\multicolumn{4}{c}{Model 2}\>\""}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"collabels2", "=", RowBox[{"{", RowBox[{ "\"\< \>\"", ",", "\"\< \>\"", ",", "\"\<\\\\multicolumn{4}{c}{$\\\\left(a_{i},a_{-i}\\\\right)=$}\>\"", ",", "\"\< \>\"", ",", "\"\<\\\\multicolumn{4}{c}{$\\\\left(a_{i},a_{-i}\\\\right)=$}\>\""}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"collabels3", "=", RowBox[{"{", RowBox[{ "\"\<$s_{i}$\>\"", ",", "\"\<$s_{-i}$\>\"", ",", "\"\<$\\\\left(0,0\\\\right)$\>\"", ",", "\"\<$\\\\left(0,1\\\\right)$\>\"", ",", "\"\<$\\\\left(1,0\\\\right)$\>\"", ",", "\"\<$\\\\left(1,1\\\\right)$\>\"", ",", "\"\< \>\"", ",", "\"\<$\\\\left(0,0\\\\right)$\>\"", ",", "\"\<$\\\\left(0,1\\\\right)$\>\"", ",", "\"\<$\\\\left(1,0\\\\right)$\>\"", ",", "\"\<$\\\\left(1,1\\\\right)$\>\""}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"rowlabels1", "=", RowBox[{"ToString", "/@", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1", ",", "1"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"rowlabels2", "=", RowBox[{"ToString", "/@", RowBox[{"{", RowBox[{"0", ",", "1", ",", "0", ",", "1"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"uTable", "=", RowBox[{"Transpose", "[", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"rowlabels1", ",", "rowlabels2"}], "}"}], ",", RowBox[{"Transpose", "[", "uTableData", "]"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"uTable", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"Insert", "[", RowBox[{"#", ",", "\"\< \>\"", ",", "7"}], "]"}], "&"}], ",", "uTable"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"uTable", "=", "\[IndentingNewLine]", RowBox[{ "\"\<\\\\begin{tabular}{ccccccccccc}\\n\>\"", "<>", "\n", "\"\<\\\\hline \\\\hline \\n\>\"", "<>", "\[IndentingNewLine]", RowBox[{"TexRow", "[", "collabels1", "]"}], "<>", "\"\<\\\\cline{3-6} \\\\cline{8-11} \>\"", "<>", "\[IndentingNewLine]", RowBox[{"TexRow", "[", "collabels2", "]"}], "<>", "\[IndentingNewLine]", RowBox[{"TexRow", "[", "collabels3", "]"}], "<>", "\"\<\\\\hline \>\"", "<>", "\[IndentingNewLine]", RowBox[{"Table2Tex", "[", "uTable", "]"}], "<>", "\"\< \\\\hline \\\\\\\\ \\n\>\"", "<>", " ", "\[IndentingNewLine]", "\"\< \\\\end{tabular} \>\""}]}], "\[IndentingNewLine]", RowBox[{"Export", "[", RowBox[{ "\"\\"", ",", "uTable", ",", "\"\\""}], "]"}]}]}]], "Input", CellChangeTimes->{{3.6628967961674356`*^9, 3.6628968010594425`*^9}, { 3.6628968441665063`*^9, 3.6628969045185966`*^9}, {3.6628969675471106`*^9, 3.6628969729471397`*^9}, {3.662897009291418*^9, 3.662897065134612*^9}, { 3.6628972385885324`*^9, 3.662897378811553*^9}, 3.662897416189691*^9, { 3.6628974594371643`*^9, 3.6628974602362103`*^9}, {3.6628992719117136`*^9, 3.6628993132537746`*^9}, {3.6628994372759094`*^9, 3.662899478509268*^9}, { 3.6628995126362195`*^9, 3.662899709006451*^9}, 3.6628997468456154`*^9, { 3.662899785196809*^9, 3.6628997931802654`*^9}, 3.6628998250870905`*^9, { 3.662899885532548*^9, 3.662899982724107*^9}, {3.662900053215126*^9, 3.662900057756386*^9}, {3.6629001054901004`*^9, 3.662900280876132*^9}, { 3.6629044392570763`*^9, 3.662904439629278*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"\<\"0\"\>", "\<\"0\"\>", "\<\"1\"\>", "\<\"-1.4\"\>", "\<\"0\"\>", "\<\ \"0\"\>", "\<\"0\"\>", "\<\"-0.506\"\>"}, {"\<\"0\"\>", "\<\"0\"\>", "\<\"1\"\>", "\<\"-1.4\"\>", "\<\"0\"\>", "\<\ \"0\"\>", "\<\"0\"\>", "\<\"-1.11\"\>"}, {"\<\"0.1\"\>", "\<\"0.1\"\>", "\<\"1.2\"\>", "\<\"-1.2\"\>", \ "\<\"0\"\>", "\<\"0\"\>", "\<\"0\"\>", "\<\"1.51\"\>"}, {"\<\"0.1\"\>", "\<\"0.1\"\>", "\<\"1.2\"\>", "\<\"-1.2\"\>", \ "\<\"0\"\>", "\<\"0\"\>", "\<\"0\"\>", "\<\"-0.399\"\>"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{ 3.662896961847078*^9, {3.6628970166218367`*^9, 3.6628970447744474`*^9}, { 3.662897275816662*^9, 3.6628973261725426`*^9}, 3.6628973791355715`*^9, 3.6628974175947714`*^9, {3.662897460642234*^9, 3.6628974877757854`*^9}, 3.6628996231605415`*^9, 3.662899711361586*^9, 3.6628999353743987`*^9, 3.6628999834131465`*^9, 3.6629000583234177`*^9, 3.6629001085402746`*^9, 3.6629002885695715`*^9, 3.6629043277870426`*^9, 3.662904440360484*^9}], Cell[BoxData["\<\"\\\\begin{tabular}{ccccccccccc}\\n\\\\hline \\\\hline \\n\\\ \\multicolumn{2}{c}{$\\\\pi \\\\left(a_{i},a_{i},s_{i},s_{-i}\\\\right)$} & \ \\\\multicolumn{4}{c}{Model 1} & & \\\\multicolumn{4}{c}{Model 2} \\\\\\\\ \ \\n\\\\cline{3-6} \\\\cline{8-11} & & \ \\\\multicolumn{4}{c}{$\\\\left(a_{i},a_{-i}\\\\right)=$} & & \ \\\\multicolumn{4}{c}{$\\\\left(a_{i},a_{-i}\\\\right)=$} \\\\\\\\ \\n$s_{i}$ \ & $s_{-i}$ & $\\\\left(0,0\\\\right)$ & $\\\\left(0,1\\\\right)$ & \ $\\\\left(1,0\\\\right)$ & $\\\\left(1,1\\\\right)$ & & \ $\\\\left(0,0\\\\right)$ & $\\\\left(0,1\\\\right)$ & \ $\\\\left(1,0\\\\right)$ & $\\\\left(1,1\\\\right)$ \\\\\\\\ \\n\\\\hline 0 & \ 0 & 0 & 0 & 1 & -1.4 & & 0 & 0 & 0 & -0.506 \\\\\\\\ \\n0 & 1 & 0 & 0 & 1 & \ -1.4 & & 0 & 0 & 0 & -1.11 \\\\\\\\ \\n1 & 0 & 0.1 & 0.1 & 1.2 & -1.2 & & \ 0 & 0 & 0 & 1.51 \\\\\\\\ \\n1 & 1 & 0.1 & 0.1 & 1.2 & -1.2 & & 0 & 0 & 0 & \ -0.399 \\\\\\\\ \\n \\\\hline \\\\\\\\ \\n \\\\end{tabular} \"\>"], "Output", CellChangeTimes->{ 3.662896961847078*^9, {3.6628970166218367`*^9, 3.6628970447744474`*^9}, { 3.662897275816662*^9, 3.6628973261725426`*^9}, 3.6628973791355715`*^9, 3.6628974175947714`*^9, {3.662897460642234*^9, 3.6628974877757854`*^9}, 3.6628996231605415`*^9, 3.662899711361586*^9, 3.6628999353743987`*^9, 3.6628999834131465`*^9, 3.6629000583234177`*^9, 3.6629001085402746`*^9, 3.6629002885695715`*^9, 3.6629043277870426`*^9, 3.662904440362484*^9}], Cell[BoxData["\<\"F:/Dropbox/land_values/IJIO/uTable.tex\"\>"], "Output", CellChangeTimes->{ 3.662896961847078*^9, {3.6628970166218367`*^9, 3.6628970447744474`*^9}, { 3.662897275816662*^9, 3.6628973261725426`*^9}, 3.6628973791355715`*^9, 3.6628974175947714`*^9, {3.662897460642234*^9, 3.6628974877757854`*^9}, 3.6628996231605415`*^9, 3.662899711361586*^9, 3.6628999353743987`*^9, 3.6628999834131465`*^9, 3.6629000583234177`*^9, 3.6629001085402746`*^9, 3.6629002885695715`*^9, 3.6629043277870426`*^9, 3.662904440367484*^9}] }, Open ]] }, Closed]] }, WindowSize->{1168, 963}, WindowMargins->{{88, Automatic}, {Automatic, 12}}, FrontEndVersion->"10.0 for Microsoft Windows (64-bit) (December 4, 2014)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 334, 6, 49, "Text"], Cell[CellGroupData[{ Cell[917, 30, 144, 2, 63, "Section"], Cell[1064, 34, 13471, 339, 1392, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[14572, 378, 104, 1, 49, "Section"], Cell[14679, 381, 21886, 560, 2052, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[36602, 946, 209, 3, 49, "Section"], Cell[CellGroupData[{ Cell[36836, 953, 691, 16, 72, "Input"], Cell[CellGroupData[{ Cell[37552, 973, 633, 16, 23, "Print"], Cell[38188, 991, 770, 19, 23, "Print"], Cell[38961, 1012, 761, 18, 23, "Print"], Cell[39725, 1032, 763, 18, 23, "Print"], Cell[40491, 1052, 748, 16, 23, "Print"], Cell[41242, 1070, 752, 16, 26, "Print"], Cell[41997, 1088, 750, 16, 26, "Print"] }, Open ]], Cell[42762, 1107, 1198, 21, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[43997, 1133, 1089, 25, 92, "Input"], Cell[CellGroupData[{ Cell[45111, 1162, 533, 15, 23, "Print"], Cell[45647, 1179, 653, 16, 23, "Print"], Cell[46303, 1197, 649, 15, 23, "Print"], Cell[46955, 1214, 661, 17, 23, "Print"], Cell[47619, 1233, 660, 17, 23, "Print"], Cell[48282, 1252, 664, 17, 23, "Print"], Cell[48949, 1271, 649, 15, 23, "Print"], Cell[49601, 1288, 651, 15, 26, "Print"], Cell[50255, 1305, 665, 17, 26, "Print"] }, Open ]], Cell[50935, 1325, 1229, 22, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[52201, 1352, 701, 17, 132, "Input"], Cell[52905, 1371, 1256, 21, 33, "Output"], Cell[54164, 1394, 1258, 21, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[55459, 1420, 135, 1, 52, "Input"], Cell[55597, 1423, 596, 14, 31, "Output"], Cell[56196, 1439, 600, 14, 31, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[56845, 1459, 155, 2, 49, "Section"], Cell[CellGroupData[{ Cell[57025, 1465, 7782, 190, 572, "Input"], Cell[64810, 1657, 1158, 16, 31, "Output"] }, Open ]], Cell[65983, 1676, 17982, 439, 1572, "Input"], Cell[CellGroupData[{ Cell[83990, 2119, 1671, 48, 92, "Input"], Cell[85664, 2169, 1097, 18, 33, "Output"] }, Open ]], Cell[86776, 2190, 398, 5, 31, "Input"], Cell[CellGroupData[{ Cell[87199, 2199, 3929, 107, 272, "Input"], Cell[91131, 2308, 1189, 21, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[92357, 2334, 1509, 41, 92, "Input"], Cell[93869, 2377, 1187, 22, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[95093, 2404, 1337, 31, 72, "Input"], Cell[CellGroupData[{ Cell[96455, 2439, 1172, 24, 23, "Print"], Cell[97630, 2465, 1289, 24, 23, "Print"], Cell[98922, 2491, 1301, 26, 26, "Print"], Cell[100226, 2519, 1168, 24, 23, "Print"], Cell[101397, 2545, 1299, 26, 23, "Print"], Cell[102699, 2573, 1304, 26, 23, "Print"], Cell[104006, 2601, 1304, 26, 26, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[105359, 2633, 265, 4, 92, "Input"], Cell[105627, 2639, 1031, 19, 33, "Output"], Cell[106661, 2660, 1033, 19, 33, "Output"], Cell[107697, 2681, 1028, 19, 33, "Output"], Cell[108728, 2702, 1029, 19, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[109794, 2726, 1507, 43, 72, "Input"], Cell[111304, 2771, 2284, 73, 52, "Output"], Cell[113591, 2846, 2243, 73, 52, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[115871, 2924, 2598, 69, 112, "Input"], Cell[118472, 2995, 2116, 67, 52, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[120625, 3067, 608, 17, 52, "Input"], Cell[121236, 3086, 977, 21, 31, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[122262, 3113, 111, 1, 49, "Section"], Cell[122376, 3116, 17377, 524, 1752, "Input"], Cell[139756, 3642, 94, 1, 31, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[139887, 3648, 143, 2, 49, "Section"], Cell[CellGroupData[{ Cell[140055, 3654, 5498, 134, 552, "Input"], Cell[145556, 3790, 1702, 34, 72, "Output"], Cell[147261, 3826, 1543, 21, 252, "Output"], Cell[148807, 3849, 846, 11, 31, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[149690, 3865, 6149, 145, 612, "Input"], Cell[155842, 4012, 1515, 30, 72, "Output"], Cell[157360, 4044, 1479, 20, 292, "Output"], Cell[158842, 4066, 544, 7, 31, "Output"] }, Open ]] }, Closed]] } ] *) (* End of internal cache information *)