lfsr
in CASH
Last updated: 2018-05-18
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: 7c1e2f8
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: .DS_Store
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: analysis/.DS_Store
Ignored: analysis/BH_robustness_cache/
Ignored: analysis/FDR_Null_cache/
Ignored: analysis/FDR_null_betahat_cache/
Ignored: analysis/Rmosek_cache/
Ignored: analysis/StepDown_cache/
Ignored: analysis/alternative2_cache/
Ignored: analysis/alternative_cache/
Ignored: analysis/ash_gd_cache/
Ignored: analysis/average_cor_gtex_2_cache/
Ignored: analysis/average_cor_gtex_cache/
Ignored: analysis/brca_cache/
Ignored: analysis/cash_deconv_cache/
Ignored: analysis/cash_fdr_1_cache/
Ignored: analysis/cash_fdr_2_cache/
Ignored: analysis/cash_fdr_3_cache/
Ignored: analysis/cash_fdr_4_cache/
Ignored: analysis/cash_fdr_5_cache/
Ignored: analysis/cash_fdr_6_cache/
Ignored: analysis/cash_plots_2_cache/
Ignored: analysis/cash_plots_cache/
Ignored: analysis/cash_sim_1_cache/
Ignored: analysis/cash_sim_2_cache/
Ignored: analysis/cash_sim_3_cache/
Ignored: analysis/cash_sim_4_cache/
Ignored: analysis/cash_sim_5_cache/
Ignored: analysis/cash_sim_6_cache/
Ignored: analysis/cash_sim_7_cache/
Ignored: analysis/correlated_z_2_cache/
Ignored: analysis/correlated_z_3_cache/
Ignored: analysis/correlated_z_cache/
Ignored: analysis/create_null_cache/
Ignored: analysis/cutoff_null_cache/
Ignored: analysis/design_matrix_2_cache/
Ignored: analysis/design_matrix_cache/
Ignored: analysis/diagnostic_ash_cache/
Ignored: analysis/diagnostic_correlated_z_2_cache/
Ignored: analysis/diagnostic_correlated_z_3_cache/
Ignored: analysis/diagnostic_correlated_z_cache/
Ignored: analysis/diagnostic_plot_2_cache/
Ignored: analysis/diagnostic_plot_cache/
Ignored: analysis/efron_leukemia_cache/
Ignored: analysis/fitting_normal_cache/
Ignored: analysis/gaussian_derivatives_2_cache/
Ignored: analysis/gaussian_derivatives_3_cache/
Ignored: analysis/gaussian_derivatives_4_cache/
Ignored: analysis/gaussian_derivatives_5_cache/
Ignored: analysis/gaussian_derivatives_cache/
Ignored: analysis/gd-ash_cache/
Ignored: analysis/gd_delta_cache/
Ignored: analysis/gd_lik_2_cache/
Ignored: analysis/gd_lik_cache/
Ignored: analysis/gd_w_cache/
Ignored: analysis/knockoff_10_cache/
Ignored: analysis/knockoff_2_cache/
Ignored: analysis/knockoff_3_cache/
Ignored: analysis/knockoff_4_cache/
Ignored: analysis/knockoff_5_cache/
Ignored: analysis/knockoff_6_cache/
Ignored: analysis/knockoff_7_cache/
Ignored: analysis/knockoff_8_cache/
Ignored: analysis/knockoff_9_cache/
Ignored: analysis/knockoff_cache/
Ignored: analysis/knockoff_var_cache/
Ignored: analysis/marginal_z_alternative_cache/
Ignored: analysis/marginal_z_cache/
Ignored: analysis/mosek_reg_2_cache/
Ignored: analysis/mosek_reg_4_cache/
Ignored: analysis/mosek_reg_5_cache/
Ignored: analysis/mosek_reg_6_cache/
Ignored: analysis/mosek_reg_cache/
Ignored: analysis/pihat0_null_cache/
Ignored: analysis/plot_diagnostic_cache/
Ignored: analysis/poster_obayes17_cache/
Ignored: analysis/real_data_simulation_2_cache/
Ignored: analysis/real_data_simulation_3_cache/
Ignored: analysis/real_data_simulation_4_cache/
Ignored: analysis/real_data_simulation_5_cache/
Ignored: analysis/real_data_simulation_cache/
Ignored: analysis/rmosek_primal_dual_2_cache/
Ignored: analysis/rmosek_primal_dual_cache/
Ignored: analysis/seqgendiff_cache/
Ignored: analysis/simulated_correlated_null_2_cache/
Ignored: analysis/simulated_correlated_null_3_cache/
Ignored: analysis/simulated_correlated_null_cache/
Ignored: analysis/simulation_real_se_2_cache/
Ignored: analysis/simulation_real_se_cache/
Ignored: analysis/smemo_2_cache/
Ignored: data/LSI/
Ignored: docs/.DS_Store
Ignored: docs/figure/.DS_Store
Ignored: output/fig/
Untracked files:
Untracked: docs/figure/cash_plots_2.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 | 7c1e2f8 | LSun | 2018-05-18 | wflow_publish(c(“analysis/cash_plots_2.rmd”, |
The analytic form of lfsr
in CASH
has been derived and implemented.
lfsr
Following the steps laid out in the posterior calculations, the lfsr
in CASH
should be defined as \[
\begin{array}{rcl}
\text{Pr}\left(\theta_j \ge 0 \mid X_j, s_j, \hat g, \hat f\right)
&=&
\displaystyle
\int_0^\infty p\left(\theta_j \ge 0 \mid X_j, s_j, \hat g, \hat f\right) \mathrm{d}\theta_j \\
&=&\frac{1}{\sum_k\sum_l\pi_k\omega_l p_{jkl}}
\sum_k\sum_l
\displaystyle
\int_0^\infty
N\left(\theta_j \mid \mu_k, \sigma_k^2\right)
\frac{1}{s_j}\frac{1}{\sqrt{l!}}
\varphi^{(l)}\left(\frac{X_j - \theta_j}{s_j}\right)
\mathrm{d}\theta_j
\end{array}
\]
The key is to get the analytic form for \[ s\left(X_i\right) =: \int_0^\infty N\left(\theta_j \mid \mu_k, \sigma_k^2\right) \frac{1}{s_j}\frac{1}{\sqrt{l!}} \varphi^{(l)}\left(\frac{X_j - \theta_j}{s_j}\right) \mathrm{d}\theta_j \ . \]
First, recognize that \[ \begin{array}{rrcl} &\varphi\left(x\right) &=& s_j N\left(s_jx \mid 0, s_j^2\right) \\\Rightarrow& \varphi^{(l)}\left(x\right) &=& s_j^{l + 1} N^{(l)}\left(s_jx \mid 0, s_j^2\right) \\\Rightarrow& \varphi^{(l)}\left(\frac{X_j - \theta_j}{s_j}\right) &=& s_j^{l + 1} N^{(l)}\left(X_j - \theta_j \mid 0, s_j^2\right) \ . \end{array} \]
Then \[ s\left(X_i\right) = \frac{s_j^l}{\sqrt{l!}} \int_0^\infty N\left(\theta_j \mid \mu_k, \sigma_k^2\right) N^{(l)}\left(X_j - \theta_j \mid 0, s_j^2\right) \mathrm{d}\theta_j \]
It’s a convolution between \[ N^+\left(\cdot \mid \mu_k, \sigma_k^2\right) =: \begin{cases} N\left(\cdot \mid \mu_k, \sigma_k^2\right) & \cdot > 0\\ 0 & \text{otherwise} \end{cases} \] and \(N^{(l)}\left(\cdot \mid 0, s_j^2\right)\). Therefore, \[ \begin{array}{rcl} s\left(X_i\right) = \frac{s_j^l}{\sqrt{l!}} N^+\left(\cdot \mid \mu_k, \sigma_k^2\right) \circledast N^{(l)}\left(\cdot \mid 0, s_j^2\right)\left(X_i\right) \\= \frac{s_j^l}{\sqrt{l!}} \left(N^+\left(\cdot \mid \mu_k, \sigma_k^2\right) \circledast N\left(\cdot \mid 0, s_j^2\right)\right)^{(l)}\left(X_i\right) \\= \frac{s_j^l}{\sqrt{l!}} \left( \displaystyle \int_0^\infty N\left(\theta_j \mid \mu_k, \sigma_k^2\right) N\left(X_j - \theta_j \mid 0, s_j^2\right) \mathrm{d}\theta_j \right)^{(l)} \\= \frac{s_j^l}{\sqrt{l!}} \left( \displaystyle \int_0^\infty \frac{1}{\sqrt{2\pi}\sigma_k} e^{-\frac{\left(\theta_j - \mu_k\right)^2}{2\sigma_k^2}} \frac{1}{\sqrt{2\pi}s_j} e^{-\frac{\left(X_j - \theta_j\right)^2}{2s_j^2}} \mathrm{d}\theta_j \right)^{(l)} \end{array} \]
This reproducible R Markdown analysis was created with workflowr 1.0.1