Last updated: 2020-09-21

Checks: 2 0

Knit directory: misc/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). 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 results in this page were generated with repository version 241207b. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

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/count.Rmd
    Untracked:  analysis/deconvSimulation2.Rmd
    Untracked:  analysis/ideas.Rmd
    Untracked:  analysis/methylation.Rmd
    Untracked:  analysis/ridge_em.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/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 repository in which changes were made to the R Markdown (analysis/kowal2019.Rmd) and HTML (docs/kowal2019.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 241207b DongyueXie 2020-09-21 wflow_publish(c(“analysis/index.Rmd”, “analysis/polya_gamma.Rmd”,

Model

Assume \[z_i(\tau)|r,\theta_i(\tau)\sim NB(r,\frac{\exp(\theta_i(\tau))}{r+\exp(\theta_i(\tau))}),\]

its mean and variance are \(\exp(\theta_i(\tau))\) and \(\exp(\theta_i(\tau))(1+\exp(\theta_i(\tau))/r)\).

This model can also be viewed as Poisson-gamma hierarchical model, where \(z_i(\tau)|\lambda_i(\tau)\sim Poisson(\lambda_i(\tau))\) and \(\lambda_i(\tau)|r,\theta_i(\tau)\sim Gamma(r,r\exp(\theta_i(\tau)))\).

If \(r\to+\infty\), then \(z_i(\tau)|\theta_i(\tau)\sim Poisson(\exp(\theta_i(\tau)))\).

To model the functional data, let \(\theta_i(\tau) = \mu_i(\tau)+\epsilon_i(\tau)\), \(\epsilon_i(\tau)\sim N(0,\sigma^2)\), and \(\mu_i(\tau) = \sum_k f_k(\tau)\beta_{k,i}\). The conditional expectation of \(z_i(\tau)\) is then \(E(z_i(\tau)|\mu,\sigma^2,r) = \exp(\mu_i(\tau))\exp(\sigma^2/2)\).

The author incorporates autoregressive model into basis coefficients: \(\beta_{k,i} = \mu_k+\phi_k(\beta_{k,i-1}-\mu_k)+\eta_{k,i}\) where \(\eta_{k,i}\sim N(0,\sigma^2_{\eta_{k,i}})\), and introduces ordered shrinkage via a multiplicative gamma process (MGP) prior on \(\mu_k,\eta_{k,i}\).

Modeling the basis functions

Modelling basis as unknown and produce data-adaptive basis? Kowal et al.(2017)

MCMC

A Polya‐Gamma data augmentation scheme is adopted to sample from the full conditional distribution of \(\theta_i(\tau)\).

  1. imputation

  2. sample \(r\) using slice sampler.

  3. Parameter expansion, sample from a polya-gamma dsitrobution

  4. sample \(\theta_i(\tau)\)

  5. Gaussian smoothing on \(\theta_i(\tau)\)