Last updated: 2020-04-13

Checks: 2 0

Knit directory: misc/

This reproducible R Markdown analysis was created with workflowr (version 1.6.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


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.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use 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/

Untracked files:
    Untracked:  analysis/contrainedclustering.Rmd
    Untracked:  analysis/deconvSimulation2.Rmd
    Untracked:  analysis/ideas.Rmd
    Untracked:  analysis/methylation.Rmd
    Untracked:  code/sccytokines.R
    Untracked:  code/scdeCalibration.R
    Untracked:  data/bart/
    Untracked:  data/cytokine/DE_controls_output_filter10.RData
    Untracked:  data/cytokine/DE_controls_output_filter10_addlimma.RData
    Untracked:  data/cytokine/README
    Untracked:  data/cytokine/test.RData
    Untracked:  data/cytokine_normalized.RData
    Untracked:  data/deconv/
    Untracked:  data/scde/

Unstaged changes:
    Modified:   analysis/CPM.Rmd
    Modified:   analysis/deconvSimulation.Rmd
    Modified:   analysis/deconvolution.Rmd
    Modified:   analysis/index.Rmd
    Modified:   analysis/limma.Rmd
    Deleted:    data/mout_high.RData
    Deleted:    data/scCDT.RData
    Deleted:    data/sva_sva_high.RData

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.


These are the previous versions of the R Markdown and HTML files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view them.

File Version Author Date Message
Rmd ef693d9 DongyueXie 2020-04-13 wflow_publish(“analysis/bda.Rmd”)

Section 4.1 Normal approximations to the posterior distribution

If the posterior distribution \(p(\theta|y)\) is unimodal and roughly symmetric(very stringent requirements), it can be convenient to approximate it by a normal distribution; that is, the logarithm of the posterior density is approximated by a quadratic function of \(\theta\).

A Taylor series expansion of \(p(\theta|y)\) around its posterior mode \(\hat\theta\) is \[\log p(\theta | y)=\log p(\hat{\theta} | y)+\frac{1}{2}(\theta-\hat{\theta})^{T}\left[\frac{d^{2}}{d \theta^{2}} \log p(\theta | y)\right]_{\theta=\hat{\theta}}(\theta-\hat{\theta}).\]

The remainder terms of higher order fade in importance relative to the quadratic term when \(\theta\) is close to \(\hat\theta\) and \(n\) is large. The normal approximations to the posterior distribution is then \[p(\theta | y) \approx \mathrm{N}\left(\hat{\theta},[I(\hat{\theta})]^{-1}\right),\] where \(I(\theta)\) is information matrix \(I(\theta) = -\frac{d^2}{d\theta}\log p(\theta|y)\). If the mode is in the interior of parameter space, then the matrix \(I(\hat\theta)\) is positive definite.

We can rewrite the coefficient of the quadratic term as

\[\left[\frac{d^{2}}{d \theta^{2}} \log p(\theta | y)\right]_{\theta=\hat{\theta}}=\left[\frac{d^{2}}{d \theta^{2}} \log p(\theta)\right]_{\theta=\hat{\theta}}+\sum_{i=1}^{n}\left[\frac{d^{2}}{d \theta^{2}} \log p\left(y_{i} | \theta\right)\right]_{\theta=\hat{\theta}}\] The importance of the prior distribution diminishes as the sample size increases.

When theory fails: 1. the likelihood is flat; 2. Number of parameters increasing with sample size; 3. …