Loading [MathJax]/jax/output/HTML-CSS/jax.js
  • Introduction

Last updated: 2020-03-04

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/methylation.Rmd
    Untracked:  code/Rplots.pdf
    Untracked:  code/sccytokines.R
    Untracked:  data/bart/
    Untracked:  data/cytokine/DE_controls_output_filter10.RData
    Untracked:  data/cytokine/DE_controls_output_filter10_addlimma.RData
    Untracked:  data/cytokine/test.RData
    Untracked:  data/cytokine_normalized.RData
    Untracked:  data/mout_high_alpha0.RData
    Untracked:  data/mout_high_alpha1.RData

Unstaged changes:
    Modified:   analysis/scdeMouthwash.Rmd
    Deleted:    data/mout_high.RData
    Modified:   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 f55aff6 DongyueXie 2020-03-04 wflow_publish(“analysis/binomialthinning.Rmd”)
html 74d8e40 DongyueXie 2020-03-04 Build site.
Rmd 7cb2741 DongyueXie 2020-03-04 wflow_publish(“analysis/binomialthinning.Rmd”)

Introduction

Investigate why effects with larger se are bigger.

Assume we have n samples and a fraction p of them belong to group 1 and the rest belong to group 2. So x=(1,1,1,...,1,0,0,0,...,0)TRn and ixi=np. Under this setting, in simple linear regression y=a+βx+ϵ, ϵN(0,σ2), the variance of ˆβ is ˆs2=nσ2nix2i(ixi)2=σ2npnp2. For fixed n and p, if ˆs is large, then this means ˆσ2 is large hence σ2 is large.

We now need to figure out the relationship between β and σ2.

Let’s assume we have RNA-Seq count data ziPoisson(λ) for i=1,2,...,n. In binomial thinning, β is the log2 fold change between groups. Now assume β>0, according to Gerard and Stephens(2017), the new(thinned) data vector is wiPoisson(μi), where μi=2β(1xi)λ. The response y in the simple linear regression is the log transformation of w, yi=log(wi), i=1,2,...n.

The Taylor series expansion of logwi around μi is log(wi)log(μi)+wiμiμi. So the mean of log(wi) is log(μi)=λβ(1xi) and variance 1μi=12β(1xi)λ. So if β is large, then Var(log(wi)) is large if xi=0. This explains the why effects with larger se are bigger.