Last updated: 2018-10-13
workflowr checks: (Click a bullet for more information) ✔ R Markdown file: up-to-date
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
✔ Repository version: e1cb954
wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: analysis/.Rhistory
Ignored: docs/.DS_Store
Ignored: docs/figure/Test.Rmd/
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
File | Version | Author | Date | Message |
---|---|---|---|---|
Rmd | e1cb954 | zouyuxin | 2018-10-13 | wflow_publish(“analysis/PoissonNormalApprox.Rmd”) |
Suppose we observe \[ X_{t} \sim Poisson(\mu_{t}) \]
\[ L(\mu_{t}) = \frac{\mu_{t}^{x_{t}} e^{-\mu_{t}}}{x_{t}!} \\ l(\mu_{t}) = x_{t} \log \mu_{t} - \mu_{t} \]
Let \(\eta_{t} = \log(\mu_{t})\)
\[ l(\eta_{t}) = x_{t} \eta_{t} - e^{\eta_{t}} \]
Using 2nd order Taylor expansion around the maximum \(\tilde{\eta}_{t}\) \[ l(\eta_{t}) \approx l(\tilde{\eta}_{t}) + l'(\tilde{\eta}_{t})(\eta_{t} - \tilde{\eta}_{t}) + \frac{l''(\tilde{\eta}_{t})}{2}(\eta_{t} - \tilde{\eta}_{t})^{2} \]
Then \[ \eta_{t} \sim N(m, \sigma^{2}) \quad m = \tilde{\eta}_{t} - \frac{l'(\tilde{\eta}_{t})}{l''(\tilde{\eta}_{t})} \quad \sigma^2 = -\frac{1}{l''(\tilde{\eta}_{t})} \]
Therefore, \[ \eta_{t} \sim N(m, \sigma^{2}) \quad m = \tilde{\eta}_{t} - \frac{x_{t} - e^{\tilde{\eta}_{t}}}{- e^{\tilde{\eta}_{t}}} \quad \sigma^2 = -\frac{1}{-e^{\tilde{\eta}_{t}}} \]
\[ m = \tilde{\eta}_{t} - \frac{x_{t} + e^{\tilde{\eta}_{t}}}{e^{\tilde{\eta}_{t}}} = \log\tilde{\mu}_{t} - \frac{x_{t} + \tilde{\mu}_{t}}{\tilde{\mu}_{t}} \quad \sigma^2 = \frac{1}{\tilde{\mu}_{t}} \]
This reproducible R Markdown analysis was created with workflowr 1.1.1