Skip to content

Commit 044942a

Browse files
authored
Merge pull request #279 from cmu-delphi/chc-math-display
Replace $ to $$
2 parents 043fb03 + 2868da7 commit 044942a

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

docs/api/covidcast-signals/changehc.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ We receive data on the following two categories of counts:
7171

7272
### COVID-Like Illness
7373

74-
For a fixed location $i$ and time $t$, let $Y_{it}$
75-
denote the Covid counts and let $N_{it}$ be the
74+
For a fixed location $$i$$ and time $$t$$, let $$Y_{it}$$
75+
denote the Covid counts and let $$N_{it}$$ be the
7676
total count of visits (the *Denominator*). Our estimate of the COVID-19
7777
percentage is given by
7878

@@ -101,26 +101,26 @@ $$
101101
\end{aligned}
102102
$$
103103

104-
where $Y_{it}$ is the observed doctor visits percentage of COVID-19 at time $t$,
105-
$\text{wd}(t) \in \{0, \dots, 6\}$ is the day-of-week of time $t$,
106-
$\alpha_{\text{wd}(t)}$ is the corresponding weekday correction, and
107-
$\phi_t$ is the corrected doctor visits percentage of COVID-19 at time $t$.
104+
where $$Y_{it}$$ is the observed doctor visits percentage of COVID-19 at time $$t$$,
105+
$$\text{wd}(t) \in \{0, \dots, 6\}$$ is the day-of-week of time $$t$$,
106+
$$\alpha_{\text{wd}(t)}$$ is the corresponding weekday correction, and
107+
$$\phi_t$$ is the corrected doctor visits percentage of COVID-19 at time $$t$$.
108108

109109
For simplicity, we assume that the weekday parameters do not change over time or
110-
location. To fit the $\alpha$ parameters, we minimize the following convex
110+
location. To fit the $$\alpha$$ parameters, we minimize the following convex
111111
objective function:
112112

113113
$$
114114
f(\alpha, \phi | \mu) = -\log \ell (\alpha,\phi|\mu) + \lambda ||\Delta^3 \phi||_1
115115
$$
116116

117-
where $\ell$ is the Poisson likelihood and $\Delta^3 \phi$ is the third
118-
differences of $\phi$. For identifiability, we constrain the sum of $\alpha$
117+
where $$\ell$$ is the Poisson likelihood and $$\Delta^3 \phi$$ is the third
118+
differences of $$\phi$$. For identifiability, we constrain the sum of $$\alpha$$
119119
to be zero by setting Sunday's fixed effect to be the negative sum of the other
120-
weekdays. The penalty term encourages the $\phi$ curve to be smooth and
121-
produces meaningful $\alpha$ values.
120+
weekdays. The penalty term encourages the $$\phi$$ curve to be smooth and
121+
produces meaningful $$\alpha$$ values.
122122

123-
Once we have estimated values for $\alpha$ for the Covid counts, we obtain the
123+
Once we have estimated values for $$\alpha$$ for the Covid counts, we obtain the
124124
adjusted count
125125

126126
$$\dot{Y}_{it} = Y_{it} / \alpha_{wd(t)}.$$
@@ -131,16 +131,16 @@ above.
131131
### Backwards Padding
132132

133133
To help with the reporting delay, we perform the following simple
134-
correction on each location. At each time $t$, we consider the total visit
134+
correction on each location. At each time $$t$$, we consider the total visit
135135
count. If the value is less than a minimum sample threshold, we go back to the
136-
previous time $t-1$, and add this visit count to the previous total, again
136+
previous time $$t-1$$, and add this visit count to the previous total, again
137137
checking to see if the threshold has been met. If not, we continue to move
138138
backwards in time until we meet the threshold, and take the estimate at time
139-
$t$ to be the average over the smallest window that meets the threshold. We
139+
$$t$$ to be the average over the smallest window that meets the threshold. We
140140
enforce a hard stop to consider only the past 7 days, if we have not yet met the
141141
threshold during that time bin, no estimate will be produced. If, for instance,
142-
at time $t$, the minimum sample threshold is already met, then the estimate
143-
only contains data from time $t$. This is a dynamic-length moving average,
142+
at time $$t$$, the minimum sample threshold is already met, then the estimate
143+
only contains data from time $$t$$. This is a dynamic-length moving average,
144144
working backwards through time. The threshold is set at 100 observations.
145145

146146
### Smoothing

0 commit comments

Comments
 (0)