Skip to content

Commit 72ca12e

Browse files
committed
deploy: c436dba
1 parent fda49ab commit 72ca12e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+9321
-4697
lines changed

changelog.html

Lines changed: 1182 additions & 628 deletions
Large diffs are not rendered by default.

compare-fixest-pyfixest.html

Lines changed: 45 additions & 45 deletions
Large diffs are not rendered by default.

contributing.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -323,14 +323,14 @@ <h2 class="anchored" data-anchor-id="quick-start-with-github-codespaces">Quick S
323323
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="ex">pixi</span> run <span class="at">-e</span> dev maturin-develop</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
324324
<p><code>pixi</code> will install the development environment and all dependencies.</p>
325325
<p>Now, create a new Python script <code>debug.py</code> at the root of the repository and paste the following:</p>
326-
<div id="5d9d598b" class="cell" data-execution_count="1">
326+
<div id="f56d5f1a" class="cell" data-execution_count="1">
327327
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb2"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> pyfixest <span class="im">as</span> pf</span>
328328
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a></span>
329329
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a>data <span class="op">=</span> pf.get_data()</span>
330330
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a>fit <span class="op">=</span> pf.feols(<span class="st">"Y ~ X1"</span>, data<span class="op">=</span>data)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
331331
<div class="cell-output cell-output-display">
332332

333-
<div id="atR3kS"></div>
333+
<div id="gNmNSm"></div>
334334
<script type="text/javascript" data-lets-plot-script="library">
335335
if(!window.letsPlotCallQueue) {
336336
window.letsPlotCallQueue = [];
@@ -354,17 +354,17 @@ <h2 class="anchored" data-anchor-id="quick-start-with-github-codespaces">Quick S
354354
var div = document.createElement("div");
355355
div.style.color = 'darkred';
356356
div.textContent = 'Error loading Lets-Plot JS';
357-
document.getElementById("atR3kS").appendChild(div);
357+
document.getElementById("gNmNSm").appendChild(div);
358358
};
359-
var e = document.getElementById("atR3kS");
359+
var e = document.getElementById("gNmNSm");
360360
e.appendChild(script);
361361
})()
362362
</script>
363363

364364
</div>
365365
<div class="cell-output cell-output-display">
366366

367-
<div id="J9UFGm"></div>
367+
<div id="0iouKB"></div>
368368
<script type="text/javascript" data-lets-plot-script="library">
369369
if(!window.letsPlotCallQueue) {
370370
window.letsPlotCallQueue = [];
@@ -388,9 +388,9 @@ <h2 class="anchored" data-anchor-id="quick-start-with-github-codespaces">Quick S
388388
var div = document.createElement("div");
389389
div.style.color = 'darkred';
390390
div.textContent = 'Error loading Lets-Plot JS';
391-
document.getElementById("J9UFGm").appendChild(div);
391+
document.getElementById("0iouKB").appendChild(div);
392392
};
393-
var e = document.getElementById("J9UFGm");
393+
var e = document.getElementById("0iouKB");
394394
e.appendChild(script);
395395
})()
396396
</script>

difference-in-differences.html

Lines changed: 59 additions & 59 deletions
Large diffs are not rendered by default.
-5.32 KB
Loading

marginaleffects.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ <h1 class="title">Marginal Effects and Hypothesis Tests via <code>marginaleffect
307307

308308

309309
<p>We can compute marginal effects and linear and non-linear hypothesis tests via the excellent <a href="https://github.com/vincentarelbundock/pymarginaleffects">marginaleffects</a> package.</p>
310-
<div id="aab720b2" class="cell" data-execution_count="1">
310+
<div id="f5f47cc5" class="cell" data-execution_count="1">
311311
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">from</span> marginaleffects <span class="im">import</span> hypotheses</span>
312312
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a></span>
313313
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> pyfixest <span class="im">as</span> pf</span>
@@ -318,7 +318,7 @@ <h1 class="title">Marginal Effects and Hypothesis Tests via <code>marginaleffect
318318
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a>fit.tidy()</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
319319
<div class="cell-output cell-output-display">
320320

321-
<div id="zgUfSq"></div>
321+
<div id="KzFda5"></div>
322322
<script type="text/javascript" data-lets-plot-script="library">
323323
if(!window.letsPlotCallQueue) {
324324
window.letsPlotCallQueue = [];
@@ -342,17 +342,17 @@ <h1 class="title">Marginal Effects and Hypothesis Tests via <code>marginaleffect
342342
var div = document.createElement("div");
343343
div.style.color = 'darkred';
344344
div.textContent = 'Error loading Lets-Plot JS';
345-
document.getElementById("zgUfSq").appendChild(div);
345+
document.getElementById("KzFda5").appendChild(div);
346346
};
347-
var e = document.getElementById("zgUfSq");
347+
var e = document.getElementById("KzFda5");
348348
e.appendChild(script);
349349
})()
350350
</script>
351351

352352
</div>
353353
<div class="cell-output cell-output-display">
354354

355-
<div id="rFNfSU"></div>
355+
<div id="lvdTV5"></div>
356356
<script type="text/javascript" data-lets-plot-script="library">
357357
if(!window.letsPlotCallQueue) {
358358
window.letsPlotCallQueue = [];
@@ -376,9 +376,9 @@ <h1 class="title">Marginal Effects and Hypothesis Tests via <code>marginaleffect
376376
var div = document.createElement("div");
377377
div.style.color = 'darkred';
378378
div.textContent = 'Error loading Lets-Plot JS';
379-
document.getElementById("rFNfSU").appendChild(div);
379+
document.getElementById("lvdTV5").appendChild(div);
380380
};
381-
var e = document.getElementById("rFNfSU");
381+
var e = document.getElementById("lvdTV5");
382382
e.appendChild(script);
383383
})()
384384
</script>
@@ -443,7 +443,7 @@ <h1 class="title">Marginal Effects and Hypothesis Tests via <code>marginaleffect
443443
</div>
444444
<p>Suppose we were interested in testing the hypothesis that <span class="math inline">\(X_{1} = X_{2}\)</span>. Given the relatively large differences in coefficients and small standard errors, we will likely reject the null that the two parameters are equal.</p>
445445
<p>We can run the formal test via the <code>hypotheses</code> function from the <code>marginaleffects</code> package.</p>
446-
<div id="ff6de2a0" class="cell" data-execution_count="2">
446+
<div id="836c6d70" class="cell" data-execution_count="2">
447447
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb2"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>hypotheses(fit, <span class="st">"X1 - X2 = 0"</span>)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
448448
<div class="cell-output cell-output-display" data-execution_count="2">
449449
<div><style>
@@ -462,7 +462,7 @@ <h2 class="anchored" data-anchor-id="non-linear-hypothesis-tests-ratio-estimates
462462
<p>We can also test run-linear hypotheses, in which case <code>marginaleffects</code> will automatically compute correct standard errors based on the estimated covariance matrix and the Delta method. This is for example useful for computing inferential statistics for the “relative uplift” in an AB test.</p>
463463
<p>For the moment, let’s assume that <span class="math inline">\(X1\)</span> is a randomly assigned treatment variable. As before, <span class="math inline">\(Y\)</span> is our variable / KPI of interest.</p>
464464
<p>Under randomization, the model intercept measures the “baseline”, i.e.&nbsp;the population average of <span class="math inline">\(Y\)</span> in the absence of treatment. To compute a relative uplift, we might compute</p>
465-
<div id="f66bce8c" class="cell" data-execution_count="3">
465+
<div id="a092b437" class="cell" data-execution_count="3">
466466
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb3"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>(fit.coef().xs(<span class="st">"X1"</span>) <span class="op">/</span> fit.coef().xs(<span class="st">"Intercept"</span>) <span class="op">-</span> <span class="dv">1</span>) <span class="op">*</span> <span class="dv">100</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
467467
<div class="cell-output cell-output-display" data-execution_count="3">
468468
<pre><code>np.float64(-211.71906665561212)</code></pre>
@@ -489,7 +489,7 @@ <h3 class="anchored" data-anchor-id="the-multivariate-delta-method">The Multivar
489489
<section id="using-the-delta-method-via-marginaleffects" class="level3">
490490
<h3 class="anchored" data-anchor-id="using-the-delta-method-via-marginaleffects">Using the Delta Method via <code>marginaleffects</code>:</h3>
491491
<p>We can employ the Delta Method via <code>marginaleffects</code> via the <code>hypotheses</code> function:</p>
492-
<div id="5d3c25c4" class="cell" data-execution_count="4">
492+
<div id="871bac2d" class="cell" data-execution_count="4">
493493
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb5"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>hypotheses(fit, <span class="st">"(X1 / Intercept - 1) * 100 = 0"</span>)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
494494
<div class="cell-output cell-output-display" data-execution_count="4">
495495
<div><style>

0 commit comments

Comments
 (0)