@@ -224,7 +224,7 @@ other half of observations indexed with :math:`i \in I`
224
224
}
225
225
226
226
g_nonorth = ggplot(data.frame(theta_rescaled=(theta_nonorth - alpha)/se_nonorth)) +
227
- geom_histogram(aes(y=.. density.. , x=theta_rescaled, colour = "Non-orthogonal ML", fill="Non-orthogonal ML"),
227
+ geom_histogram(aes(y=after_stats( density) , x=theta_rescaled, colour = "Non-orthogonal ML", fill="Non-orthogonal ML"),
228
228
bins = 30, alpha = 0.3) +
229
229
geom_vline(aes(xintercept = 0), col = "black") +
230
230
suppressWarnings(geom_function(fun = dnorm, aes(colour = "N(0, 1)", fill="N(0, 1)"))) +
@@ -348,7 +348,7 @@ orthogonalized regressor :math:`V = D - m(X)`. We then use the final estimate
348
348
}
349
349
350
350
g_nosplit = ggplot(data.frame(theta_rescaled=(theta_orth_nosplit - alpha)/se_orth_nosplit), aes(x = theta_rescaled)) +
351
- geom_histogram(aes(y=.. density.. , x=theta_rescaled, colour = "Double ML (no sample splitting)", fill="Double ML (no sample splitting)"),
351
+ geom_histogram(aes(y=after_stats( density) , x=theta_rescaled, colour = "Double ML (no sample splitting)", fill="Double ML (no sample splitting)"),
352
352
bins = 30, alpha = 0.3) +
353
353
geom_vline(aes(xintercept = 0), col = "black") +
354
354
suppressWarnings(geom_function(fun = dnorm, aes(colour = "N(0, 1)", fill="N(0, 1)"))) +
@@ -452,7 +452,7 @@ Cross-fitting performs well empirically because the entire sample can be used fo
452
452
}
453
453
454
454
g_dml = ggplot(data.frame(theta_rescaled=(theta_dml - alpha)/se_dml), aes(x = theta_rescaled)) +
455
- geom_histogram(aes(y=.. density.. , x=theta_rescaled, colour = "Double ML with cross-fitting", fill="Double ML with cross-fitting"),
455
+ geom_histogram(aes(y=after_stats( density) , x=theta_rescaled, colour = "Double ML with cross-fitting", fill="Double ML with cross-fitting"),
456
456
bins = 30, alpha = 0.3) +
457
457
geom_vline(aes(xintercept = 0), col = "black") +
458
458
suppressWarnings(geom_function(fun = dnorm, aes(colour = "N(0, 1)", fill="N(0, 1)"))) +
@@ -525,11 +525,11 @@ The third term :math:`c^*` vanishes in probability if sample splitting is applie
525
525
g_all = ggplot(data.frame(t_nonorth=(theta_nonorth - alpha)/se_nonorth,
526
526
t_orth_nosplit=(theta_orth_nosplit - alpha)/se_orth_nosplit,
527
527
t_dml=(theta_dml - alpha)/se_dml)) +
528
- geom_histogram(aes(x = t_nonorth, y=.. density.. , colour = "Non-orthogonal ML", fill="Non-orthogonal ML"),
528
+ geom_histogram(aes(x = t_nonorth, y=after_stats( density) , colour = "Non-orthogonal ML", fill="Non-orthogonal ML"),
529
529
bins = 30, alpha = 0.3) +
530
- geom_histogram(aes(x = t_orth_nosplit, y=.. density.. , colour = "Double ML (no sample splitting)", fill="Double ML (no sample splitting)"),
530
+ geom_histogram(aes(x = t_orth_nosplit, y=after_stats( density) , colour = "Double ML (no sample splitting)", fill="Double ML (no sample splitting)"),
531
531
bins = 30, alpha = 0.3) +
532
- geom_histogram(aes(x = t_dml, y=.. density.. , colour = "Double ML with cross-fitting", fill="Double ML with cross-fitting"),
532
+ geom_histogram(aes(x = t_dml, y=after_stats( density) , colour = "Double ML with cross-fitting", fill="Double ML with cross-fitting"),
533
533
bins = 30, alpha = 0.3) +
534
534
geom_vline(aes(xintercept = 0), col = "black") +
535
535
suppressWarnings(geom_function(fun = dnorm, aes(colour = "N(0, 1)", fill="N(0, 1)"))) +
@@ -643,7 +643,7 @@ estimate :math:`\theta_0` without sample splitting. Again we observe a bias from
643
643
}
644
644
645
645
g_nosplit = ggplot(data.frame(theta_rescaled=(theta_orth_po_nosplit - alpha)/se_orth_po_nosplit), aes(x = theta_rescaled)) +
646
- geom_histogram(aes(y=.. density.. , x=theta_rescaled, colour = "Double ML (no sample splitting)", fill="Double ML (no sample splitting)"),
646
+ geom_histogram(aes(y=after_stats( density) , x=theta_rescaled, colour = "Double ML (no sample splitting)", fill="Double ML (no sample splitting)"),
647
647
bins = 30, alpha = 0.3) +
648
648
geom_vline(aes(xintercept = 0), col = "black") +
649
649
suppressWarnings(geom_function(fun = dnorm, aes(colour = "N(0, 1)", fill="N(0, 1)"))) +
@@ -735,7 +735,7 @@ Using sample splitting, overcomes the bias induced by overfitting.
735
735
}
736
736
737
737
g_dml = ggplot(data.frame(theta_rescaled=(theta_dml_po - alpha)/se_dml_po), aes(x = theta_rescaled)) +
738
- geom_histogram(aes(y=.. density.. , x=theta_rescaled, colour = "Double ML with cross-fitting", fill="Double ML with cross-fitting"),
738
+ geom_histogram(aes(y=after_stats( density) , x=theta_rescaled, colour = "Double ML with cross-fitting", fill="Double ML with cross-fitting"),
739
739
bins = 30, alpha = 0.3) +
740
740
geom_vline(aes(xintercept = 0), col = "black") +
741
741
suppressWarnings(geom_function(fun = dnorm, aes(colour = "N(0, 1)", fill="N(0, 1)"))) +
@@ -780,11 +780,11 @@ Using sample splitting, overcomes the bias induced by overfitting.
780
780
g_all = ggplot(data.frame(t_nonorth=(theta_nonorth - alpha)/se_nonorth,
781
781
t_orth_nosplit=(theta_orth_po_nosplit - alpha)/se_orth_po_nosplit,
782
782
t_dml=(theta_dml_po - alpha)/se_dml_po)) +
783
- geom_histogram(aes(x = t_nonorth, y=.. density.. , colour = "Non-orthogonal ML", fill="Non-orthogonal ML"),
783
+ geom_histogram(aes(x = t_nonorth, y=after_stats( density) , colour = "Non-orthogonal ML", fill="Non-orthogonal ML"),
784
784
bins = 30, alpha = 0.3) +
785
- geom_histogram(aes(x = t_orth_nosplit, y=.. density.. , colour = "Double ML (no sample splitting)", fill="Double ML (no sample splitting)"),
785
+ geom_histogram(aes(x = t_orth_nosplit, y=after_stats( density) , colour = "Double ML (no sample splitting)", fill="Double ML (no sample splitting)"),
786
786
bins = 30, alpha = 0.3) +
787
- geom_histogram(aes(x = t_dml, y=.. density.. , colour = "Double ML with cross-fitting", fill="Double ML with cross-fitting"),
787
+ geom_histogram(aes(x = t_dml, y=after_stats( density) , colour = "Double ML with cross-fitting", fill="Double ML with cross-fitting"),
788
788
bins = 30, alpha = 0.3) +
789
789
geom_vline(aes(xintercept = 0), col = "black") +
790
790
suppressWarnings(geom_function(fun = dnorm, aes(colour = "N(0, 1)", fill="N(0, 1)"))) +
0 commit comments