Last updated: 2022-12-04

Checks: 2 0

Knit directory: gsmash/

This reproducible R Markdown analysis was created with workflowr (version 1.7.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 results in this page were generated with repository version 888f240. 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/
    Ignored:    data/poisson_mean_simulation/

Untracked files:
    Untracked:  figure/
    Untracked:  output/poisson_mean_simulation/
    Untracked:  output/poisson_smooth_simulation/

Unstaged changes:
    Modified:   analysis/normal_mean_penalty_glm_simplified.Rmd
    Modified:   analysis/trendfiltering.ipynb
    Modified:   code/poisson_mean/simulation_summary.R

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/PMF_splitting_simulation.Rmd) and HTML (docs/PMF_splitting_simulation.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 888f240 DongyueXie 2022-12-04 wflow_publish("analysis/PMF_splitting_simulation.Rmd")
html d95404a DongyueXie 2022-12-01 Build site.
Rmd 0780c8b DongyueXie 2022-12-01 wflow_publish("analysis/PMF_splitting_simulation.Rmd")

Introduction

This is the first simulation I tried. But a more realistic one is under development.

I generated data from the following model:

\[Y_{ij}\sim Poisson(\exp(l_{0i}f_{0j}+\sum_k l_{ik}f_{kj}+e_{ij})),\] \[l_{0i}\sim Uniform(a,b),f_{0j}\sim Uniform(a,b),\]

\[l_{ki}\sim N(0,d_k),f_{kj}\sim \pi_0\delta_0 + (1-\pi_0)N(0,\sigma^2_1),\] \[e_{ij}\sim N(0,\sigma^2).\] The \(S_0 = \exp(l_0f_0')\) is the background/baseline frequency.

I set \(n=p\in\{100,200,500,1000\}\), \(a=1,b=2\), \(d_k=1\) for \(k=1,2,...,K\), \(K=3\), \(\sigma^2\in\{0,0.25\}\), \(\sigma^2_1 = 1\), \(\pi_0 = 0.8\).

Conclusions from this simulation

A. Splitting approach can often identify the correct number of factors.

B. When \(\sigma^2\) is larger, the algorithm converges faster.