Skip to content

Commit

Permalink
Update petrin.ipynb (#139)
Browse files Browse the repository at this point in the history
fix typo describing the shape of inside good weights
  • Loading branch information
kenneth-rios committed Jun 23, 2023
1 parent e2f6eaa commit 092e468
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/notebooks/tutorial/petrin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@
"source": [
"We called the dataset \"CEX\", defined the number of observations in it, and also defined a lambda function for computing survey weights in a market. The `compute_weights` function has three arguments: the current market's ID $t$, the $J_t$ :class:`Products` inside the market, and the $I_t$ :class:`Agents` inside the market. In this case, we are assuming that each product and agent/consumer type are sampled with equal probability, so we simply return a matrix of ones of shape $I_t \\times (1 + J_t)$. This sets each $w_{dijt} = 1$.\n",
"\n",
"By using $1 + J_t$ instead of $J_t$, we are specifying that the micro dataset contains observations of the outside option $j = 0$. If we instead specified a matrix of shape $I_t \\times (1 + J_t)$, this would be the same as setting the first column equal to all zeros, so that outside choices are not sampled from.\n",
"By using $1 + J_t$ instead of $J_t$, we are specifying that the micro dataset contains observations of the outside option $j = 0$. If we instead specified a matrix of shape $I_t \\times J_t$, this would be the same as setting the first column equal to all zeros, so that outside choices are not sampled from.\n",
"\n",
"We will be matching a few different statistics that were computed from this survey. For convenience, they are packaged in a data file with pyblp.\n"
]
Expand Down

0 comments on commit 092e468

Please sign in to comment.