Skip to content

Commit 936aef7

Browse files
committed
update weighted formulas for count and binary indicators
1 parent 13dc15e commit 936aef7

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

docs/api/covidcast-signals/fb-survey.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -737,13 +737,13 @@ with estimated standard errors:
737737

738738
$$
739739
\begin{aligned}
740-
\widehat{\mathrm{se}}(\hat{p}_w) &= 100 \cdot \sqrt{
741-
\left(\frac{1}{1 + n_e}\right)^2 \left(\frac12 - \frac{\hat{p}_w}{100}\right)^2 +
742-
n_e \hat{s}_p^2
740+
\widehat{\mathrm{se}}(\hat{p}_w) &= 100 \cdot \frac{1}{1 + n_e} \sqrt{
741+
\left(\frac12 - \frac{\hat{p}_w}{100}\right)^2 +
742+
n_e^2 \hat{s}_p^2
743743
}\\
744-
\widehat{\mathrm{se}}(\hat{q}_w) &= 100 \cdot \sqrt{
745-
\left(\frac{1}{1 + n_e}\right)^2 \left(\frac12 - \frac{\hat{q}_w}{100}\right)^2 +
746-
n_e \hat{s}_q^2
744+
\widehat{\mathrm{se}}(\hat{q}_w) &= 100 \cdot \frac{1}{1 + n_e} \sqrt{
745+
\left(\frac12 - \frac{\hat{q}_w}{100}\right)^2 +
746+
n_e^2 \hat{s}_q^2
747747
},
748748
\end{aligned}
749749
$$
@@ -760,8 +760,8 @@ $$
760760

761761
which are the delta method estimates of variance associated with self-normalized
762762
importance sampling estimators above, after combining with a pseudo-observation
763-
of 1/2 with weight assigned to appear like a single effective observation
764-
according to importance sampling diagnostics.
763+
of 1/2 with weight $$\frac{1}{n_e}$$, assigned to appear like a single effective
764+
observation according to importance sampling diagnostics.
765765

766766
The sample size reported is calculated by rounding down $$\sum_{i=1}^{m}
767767
w^{\text{geodiv}}_i$$ before adding the pseudo-observations. When ZIP codes do
@@ -788,28 +788,33 @@ and $$V_i$$ denote the indicators that the survey respondent knows someone in
788788
their community with CLI, including and not including their household,
789789
respectively, for survey $$i$$, out of $$m$$ surveys collected. Also let
790790
$$w_i$$ be the self-normalized weight that accompanies survey $$i$$, as
791-
above. Then our adjusted estimates of $$a$$ and $$b$$ are:
791+
above. Then our initial weighted estimates of $$a$$ and $$b$$ are:
792792

793793
$$
794794
\begin{aligned}
795-
\hat{a}_w &= 100 \cdot \sum_{i=1}^m w_i U_i \\
796-
\hat{b}_w &= 100 \cdot \sum_{i=1}^m w_i V_i.
795+
\hat{a}_{w, init} &= 100 \cdot \sum_{i=1}^m w_i U_i \\
796+
\hat{b}_{w, init} &= 100 \cdot \sum_{i=1}^m w_i V_i.
797+
\end{aligned}
798+
$$
799+
800+
After combining with a pseudo-observation, defined as before,
801+
802+
$$
803+
\begin{aligned}
804+
\hat{a}_w &= 100 \cdot \frac{n_e \frac{\hat{a}_{w, init}}{100} + \frac12}{1 + n_e} \\
805+
\hat{b}_w &= 100 \cdot \frac{n_e \frac{\hat{b}_{w, init}}{100} + \frac12}{1 + n_e}.
797806
\end{aligned}
798807
$$
799808

800809
with estimated standard errors:
801810

802811
$$
803812
\begin{aligned}
804-
\widehat{\mathrm{se}}(\hat{a}_w) &= 100 \cdot \sqrt{\sum_{i=1}^m
805-
w_i^2 \left(U_i - \frac{\hat{a}_w}{100} \right)^2} \\
806-
\widehat{\mathrm{se}}(\hat{b}_w) &= 100 \cdot \sqrt{\sum_{i=1}^m
807-
w_i^2 \left(V_i - \frac{\hat{b}_w}{100} \right)^2},
813+
\widehat{\mathrm{se}}(\hat{a}_w) &= 100 \cdot \sqrt{\frac{\frac{\hat{a}_w}{100}(1-\frac{\hat{a}_w}{100})}{1 + n_e}} \\
814+
\widehat{\mathrm{se}}(\hat{b}_w) &= 100 \cdot \sqrt{\frac{\frac{\hat{b}_w}{100}(1-\frac{\hat{b}_w}{100})}{1 + n_e}}.
808815
\end{aligned}
809816
$$
810817

811-
the delta method estimates of variance associated with self-normalized
812-
importance sampling estimators.
813818

814819
## Appendix
815820

0 commit comments

Comments
 (0)