Skip to content

Commit 35d2b94

Browse files
committed
deploy: 3dfda41
1 parent 1a6fdc4 commit 35d2b94

33 files changed

+3135
-3143
lines changed

changelog.html

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

compare-fixest-pyfixest.html

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

contributing.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -319,14 +319,14 @@ <h2 class="anchored" data-anchor-id="quick-start-with-github-codespaces">Quick S
319319
<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>
320320
<p><code>pixi</code> will install the development environment and all dependencies.</p>
321321
<p>Now, create a new Python script <code>debug.py</code> at the root of the repository and paste the following:</p>
322-
<div id="04fefddc" class="cell" data-execution_count="1">
322+
<div id="b9778ce4" class="cell" data-execution_count="1">
323323
<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>
324324
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a></span>
325325
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a>data <span class="op">=</span> pf.get_data()</span>
326326
<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>
327327
<div class="cell-output cell-output-display">
328328

329-
<div id="MQw16M"></div>
329+
<div id="DYATy5"></div>
330330
<script type="text/javascript" data-lets-plot-script="library">
331331
if(!window.letsPlotCallQueue) {
332332
window.letsPlotCallQueue = [];
@@ -350,17 +350,17 @@ <h2 class="anchored" data-anchor-id="quick-start-with-github-codespaces">Quick S
350350
var div = document.createElement("div");
351351
div.style.color = 'darkred';
352352
div.textContent = 'Error loading Lets-Plot JS';
353-
document.getElementById("MQw16M").appendChild(div);
353+
document.getElementById("DYATy5").appendChild(div);
354354
};
355-
var e = document.getElementById("MQw16M");
355+
var e = document.getElementById("DYATy5");
356356
e.appendChild(script);
357357
})()
358358
</script>
359359

360360
</div>
361361
<div class="cell-output cell-output-display">
362362

363-
<div id="w6PRHD"></div>
363+
<div id="fAtWMH"></div>
364364
<script type="text/javascript" data-lets-plot-script="library">
365365
if(!window.letsPlotCallQueue) {
366366
window.letsPlotCallQueue = [];
@@ -384,9 +384,9 @@ <h2 class="anchored" data-anchor-id="quick-start-with-github-codespaces">Quick S
384384
var div = document.createElement("div");
385385
div.style.color = 'darkred';
386386
div.textContent = 'Error loading Lets-Plot JS';
387-
document.getElementById("w6PRHD").appendChild(div);
387+
document.getElementById("fAtWMH").appendChild(div);
388388
};
389-
var e = document.getElementById("w6PRHD");
389+
var e = document.getElementById("fAtWMH");
390390
e.appendChild(script);
391391
})()
392392
</script>

difference-in-differences.html

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

marginaleffects.html

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

304304

305305
<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>
306-
<div id="f351fbba" class="cell" data-execution_count="1">
306+
<div id="e3da9166" class="cell" data-execution_count="1">
307307
<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>
308308
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a></span>
309309
<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>
@@ -314,7 +314,7 @@ <h1 class="title">Marginal Effects and Hypothesis Tests via <code>marginaleffect
314314
<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>
315315
<div class="cell-output cell-output-display">
316316

317-
<div id="q7DYNB"></div>
317+
<div id="A1HfOz"></div>
318318
<script type="text/javascript" data-lets-plot-script="library">
319319
if(!window.letsPlotCallQueue) {
320320
window.letsPlotCallQueue = [];
@@ -338,17 +338,17 @@ <h1 class="title">Marginal Effects and Hypothesis Tests via <code>marginaleffect
338338
var div = document.createElement("div");
339339
div.style.color = 'darkred';
340340
div.textContent = 'Error loading Lets-Plot JS';
341-
document.getElementById("q7DYNB").appendChild(div);
341+
document.getElementById("A1HfOz").appendChild(div);
342342
};
343-
var e = document.getElementById("q7DYNB");
343+
var e = document.getElementById("A1HfOz");
344344
e.appendChild(script);
345345
})()
346346
</script>
347347

348348
</div>
349349
<div class="cell-output cell-output-display">
350350

351-
<div id="RWRG2t"></div>
351+
<div id="6k7pAa"></div>
352352
<script type="text/javascript" data-lets-plot-script="library">
353353
if(!window.letsPlotCallQueue) {
354354
window.letsPlotCallQueue = [];
@@ -372,9 +372,9 @@ <h1 class="title">Marginal Effects and Hypothesis Tests via <code>marginaleffect
372372
var div = document.createElement("div");
373373
div.style.color = 'darkred';
374374
div.textContent = 'Error loading Lets-Plot JS';
375-
document.getElementById("RWRG2t").appendChild(div);
375+
document.getElementById("6k7pAa").appendChild(div);
376376
};
377-
var e = document.getElementById("RWRG2t");
377+
var e = document.getElementById("6k7pAa");
378378
e.appendChild(script);
379379
})()
380380
</script>
@@ -439,7 +439,7 @@ <h1 class="title">Marginal Effects and Hypothesis Tests via <code>marginaleffect
439439
</div>
440440
<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>
441441
<p>We can run the formal test via the <code>hypotheses</code> function from the <code>marginaleffects</code> package.</p>
442-
<div id="1489d91d" class="cell" data-execution_count="2">
442+
<div id="dc52165c" class="cell" data-execution_count="2">
443443
<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>
444444
<div class="cell-output cell-output-display" data-execution_count="2">
445445
<div><style>
@@ -458,7 +458,7 @@ <h2 class="anchored" data-anchor-id="non-linear-hypothesis-tests-ratio-estimates
458458
<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>
459459
<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>
460460
<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>
461-
<div id="9d8b8cd3" class="cell" data-execution_count="3">
461+
<div id="004d2300" class="cell" data-execution_count="3">
462462
<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>
463463
<div class="cell-output cell-output-display" data-execution_count="3">
464464
<pre><code>np.float64(-211.71906665561212)</code></pre>
@@ -485,7 +485,7 @@ <h3 class="anchored" data-anchor-id="the-multivariate-delta-method">The Multivar
485485
<section id="using-the-delta-method-via-marginaleffects" class="level3">
486486
<h3 class="anchored" data-anchor-id="using-the-delta-method-via-marginaleffects">Using the Delta Method via <code>marginaleffects</code>:</h3>
487487
<p>We can employ the Delta Method via <code>marginaleffects</code> via the <code>hypotheses</code> function:</p>
488-
<div id="d17c7b55" class="cell" data-execution_count="4">
488+
<div id="8627749a" class="cell" data-execution_count="4">
489489
<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>
490490
<div class="cell-output cell-output-display" data-execution_count="4">
491491
<div><style>

0 commit comments

Comments
 (0)